mirror of https://github.com/wb2osz/direwolf.git
Fix UNITTEST for MacOSX.
This commit is contained in:
parent
5d02e0ba0e
commit
6513efd052
|
@ -251,6 +251,20 @@ else()
|
||||||
endif(WIN32 OR CYGWIN)
|
endif(WIN32 OR CYGWIN)
|
||||||
|
|
||||||
# requirements
|
# requirements
|
||||||
|
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
# Some platforms provide their own strlcpy & strlcat. (BSD, MacOSX)
|
||||||
|
# Others don't so we provide our own. (Most, but not all Linux)
|
||||||
|
# Define the preprocessor macro so libgps does not supply its own version.
|
||||||
|
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
|
||||||
|
if(HAVE_STRLCPY)
|
||||||
|
add_compile_options(-DHAVE_STRLCPY)
|
||||||
|
endif()
|
||||||
|
check_symbol_exists(strlcat string.h HAVE_STRLCAT)
|
||||||
|
if(HAVE_STRLCAT)
|
||||||
|
add_compile_options(-DHAVE_STRLCAT)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,3 @@
|
||||||
include(CheckSymbolExists)
|
|
||||||
# Some platforms provide their own strlcpy & strlcat. (BSD, MacOSX)
|
|
||||||
# Others don't so we provide our own. (Most, but not all Linux)
|
|
||||||
# Define the preprocessor macro so libgps does not supply its own version.
|
|
||||||
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
|
|
||||||
if(HAVE_STRLCPY)
|
|
||||||
add_compile_options(-DHAVE_STRLCPY)
|
|
||||||
endif()
|
|
||||||
check_symbol_exists(strlcat string.h HAVE_STRLCAT)
|
|
||||||
if(HAVE_STRLCAT)
|
|
||||||
add_compile_options(-DHAVE_STRLCAT)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# global includes
|
# global includes
|
||||||
# not ideal but not so slow
|
# not ideal but not so slow
|
||||||
|
|
Loading…
Reference in New Issue