From 251eb229bb34e1512bbb8011e466eb06fcb54269 Mon Sep 17 00:00:00 2001 From: Thomas Feuvrier <thomas.feuvrier@c-s.fr> Date: Mon, 21 Sep 2009 18:25:05 +0200 Subject: [PATCH] ENH: Add TRY_COMPILE when External Boost library is selected. If the compilation aborted, then the internal boost library is used, and OTB_USE_EXTERNAL_BOOST cmake value is force to OFF. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e746039fd..f94dca78d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -442,11 +442,11 @@ IF(OTB_USE_EXTERNAL_BOOST) CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${Boost_INCLUDE_DIR}" OUTPUT_VARIABLE OUTPUT) IF(BOOST_IS_COMPLETE) - MESSAGE(STATUS "Testing external Boost library -- yes") + MESSAGE(ERROR "Testing external Boost library -- yes") ELSE(BOOST_IS_COMPLETE) - MESSAGE(STATUS "Testing external Boost library -- no") + MESSAGE(ERROR "Testing external Boost library -- no") MESSAGE(STATUS "Force the OTB_USE_EXTERNAL_BOOST value to OFF.") - SET(OTB_USE_EXTERNAL_BOOST OFF) + SET(OTB_USE_EXTERNAL_BOOST OFF CACHE BOOL "Use an outside build of Boost." FORCE ) ENDIF(BOOST_IS_COMPLETE) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) -- GitLab