diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bc281f5..7805a8c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -183,7 +183,7 @@ if(CMakePythonDistributions_SUPERBUILD) endforeach() set(_common_args ) - if(UNIX AND NOT APPLE) + if(UNIX AND (NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")) # Since CMAKE_C_FLAGS and CMAKE_EXE_LINKER_FLAGS arguments contain spaces, we generate an initial # cache file. file(WRITE "${CMAKE_BINARY_DIR}/initial-cache.txt"