aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nimterop/build.nim6
-rw-r--r--nimterop/cimport.nim2
2 files changed, 4 insertions, 4 deletions
diff --git a/nimterop/build.nim b/nimterop/build.nim
index cc6dc22..a025dc0 100644
--- a/nimterop/build.nim
+++ b/nimterop/build.nim
@@ -358,7 +358,7 @@ proc findFile*(file: string, dir: string, recurse = true, first = false, regex =
"nimgrep --filenames --oneline --nocolor $1 \"$2\" $3"
elif defined(linux):
"find $3 $1 -regextype egrep -regex $2"
- elif defined(osx):
+ elif defined(osx) or defined(FreeBSD):
"find -E $3 $1 -regex $2"
recursive = ""
@@ -754,7 +754,7 @@ proc getNumProcs(): string =
getEnv("NUMBER_OF_PROCESSORS").strip()
elif defined(linux):
execAction("nproc").output.strip()
- elif defined(macosx):
+ elif defined(macosx) or defined(FreeBSD):
execAction("sysctl -n hw.ncpu").output.strip()
else:
"1"
@@ -830,7 +830,7 @@ proc buildLibrary(lname, outdir, conFlags, cmakeFlags, makeFlags: string): strin
proc getDynlibExt(): string =
when defined(windows):
result = ".dll"
- elif defined(linux):
+ elif defined(linux) or defined(FreeBSD):
result = ".so[0-9.]*"
elif defined(macosx):
result = ".dylib[0-9.]*"
diff --git a/nimterop/cimport.nim b/nimterop/cimport.nim
index 382c034..52d1892 100644
--- a/nimterop/cimport.nim
+++ b/nimterop/cimport.nim
@@ -82,7 +82,7 @@ proc getFileDate(fullpath: string): string =
&"cmd /c for %a in ({fullpath.sanitizePath}) do echo %~ta"
elif defined(Linux):
&"stat -c %y {fullpath.sanitizePath}"
- elif defined(OSX):
+ elif defined(OSX) or defined(FreeBSD):
&"stat -f %m {fullpath.sanitizePath}"
(result, ret) = execAction(cmd)