diff options
author | don bright <hugh.m.bright@gmail.com> | 2011-12-26 17:53:22 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2011-12-26 17:53:22 (GMT) |
commit | 1aadb679de94108763445e6369447d02260e0130 (patch) | |
tree | 3447a2a5bac328380999a340c7e99591c2d7e708 /tests | |
parent | f6ba8cd53a34e4be676ab9217b87ff1de92ed9f1 (diff) |
fix bug on system with OPENSCAD_LIBRARIES + mult versions of boost
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 33 |
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}) |