summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt33
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5b323d7..6eb9610 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -65,30 +65,31 @@ endif()
#
# Boost
-if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
- set(BOOST_DIR "$ENV{OPENSCAD_LIBRARIES}")
-endif()
+# Update this if FindBoost.cmake gets out of sync with the current boost release
+# set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0")
-if (NOT $ENV{BOOSTDIR} STREQUAL "")
- set(BOOST_DIR "$ENV{BOOSTDIR}")
- set(Boost_DEBUG TRUE)
+if (WIN32)
+ set(Boost_USE_STATIC_LIBS TRUE)
+ set(BOOST_STATIC TRUE)
+ set(BOOST_THREAD_USE_LIB TRUE)
endif()
-if (NOT ${BOOST_DIR} STREQUAL "")
- set(BOOST_ROOT ${BOOST_DIR})
+if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "")
+ set(BOOST_ROOT "$ENV{OPENSCAD_LIBRARIES}")
+ if (EXISTS ${BOOST_ROOT}/include/boost)
+ # workaround bugs in FindBoost.cmake with multiple versions of boost
+ set(Boost_NO_SYSTEM_PATHS "TRUE")
+ endif()
message(STATUS "BOOST_ROOT: " ${BOOST_ROOT})
- set(Boost_NO_SYSTEM_PATHS "TRUE")
endif()
-
-if (WIN32)
- set(Boost_USE_STATIC_LIBS TRUE)
- set(BOOST_STATIC TRUE)
- set(BOOST_THREAD_USE_LIB TRUE)
+if (NOT $ENV{BOOSTDIR} STREQUAL "")
+ set(BOOST_ROOT "$ENV{BOOSTDIR}")
+ set(Boost_NO_SYSTEM_PATHS "TRUE")
+ set(Boost_DEBUG TRUE)
+ message(STATUS "BOOST_ROOT: " ${BOOST_ROOT})
endif()
-# Update this if FindBoost.cmake gets out of sync with the current boost release
-# set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0")
find_package( Boost 1.35.0 COMPONENTS thread program_options REQUIRED)
if(Boost_FOUND)
message(STATUS "Boost includes found: " ${Boost_INCLUDE_DIRS})
contact: Jan Huwald // Impressum