Commit 203f1f33 authored by Nicolas Cadart's avatar Nicolas Cadart
Browse files

Perform Boost environment variables check after call to common superbuild

This check uses the USE_SYSTEM_boost CMake variable, automatically set by common-superbuild.
To use it, this check must be performed after call to common-superbuild, or it throws an error.
parent 4a99c6b0
......@@ -203,13 +203,6 @@ set(boost_libraries
set(boost_extra_options
"-sNO_BZIP2=1")
# Check if some Boost environment variables could hide local Boost install
if (NOT ${USE_SYSTEM_boost} AND (DEFINED ENV{BOOSTROOT} OR DEFINED ENV{BOOST_ROOT} OR DEFINED ENV{BOOST_LIBRARYDIR} OR DEFINED ENV{BOOST_INCLUDEDIR}))
message(WARNING "Some Boost environment variables are set and may hide the local superbuild Boost installation. "
"Consider enabling USE_SYSTEM_boost flag or unsetting the following environement variables :\n"
" BOOSTROOT=$ENV{BOOSTROOT}\n BOOST_ROOT=$ENV{BOOST_ROOT}\n BOOST_LIBRARYDIR=$ENV{BOOST_LIBRARYDIR}\n BOOST_INCLUDEDIR=$ENV{BOOST_INCLUDEDIR}")
endif()
list(APPEND superbuild_version_files
"${CMAKE_CURRENT_LIST_DIR}/versions.cmake")
list(APPEND superbuild_project_roots
......@@ -236,3 +229,10 @@ if (ENABLE_slam AND ENABLE_old_slam)
endif(ENABLE_slam AND ENABLE_old_slam)
add_subdirectory(common-superbuild)
# Check if some Boost environment variables could hide local Boost install
if (NOT ${USE_SYSTEM_boost} AND (DEFINED ENV{BOOSTROOT} OR DEFINED ENV{BOOST_ROOT} OR DEFINED ENV{BOOST_LIBRARYDIR} OR DEFINED ENV{BOOST_INCLUDEDIR}))
message(WARNING "Some Boost environment variables are set and may hide the local superbuild Boost installation. "
"Consider enabling USE_SYSTEM_boost flag or unsetting the following environement variables :\n"
" BOOSTROOT=$ENV{BOOSTROOT}\n BOOST_ROOT=$ENV{BOOST_ROOT}\n BOOST_LIBRARYDIR=$ENV{BOOST_LIBRARYDIR}\n BOOST_INCLUDEDIR=$ENV{BOOST_INCLUDEDIR}")
endif()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment