From 471209e80d3053a5aae757f69b9bb32d45da3cf1 Mon Sep 17 00:00:00 2001
From: Thomas Feuvrier <thomas.feuvrier@c-s.fr>
Date: Mon, 21 Sep 2009 18:23:10 +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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f94dca78d4..d72d01f5b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -442,9 +442,9 @@ IF(OTB_USE_EXTERNAL_BOOST)
   CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${Boost_INCLUDE_DIR}" 
   OUTPUT_VARIABLE OUTPUT)
   IF(BOOST_IS_COMPLETE)
-    MESSAGE(ERROR "Testing external Boost library    -- yes")
+    MESSAGE(STATUS "Testing external Boost library    -- yes")
   ELSE(BOOST_IS_COMPLETE)
-    MESSAGE(ERROR "Testing external Boost library    -- no")
+    MESSAGE(STATUS "Testing external Boost library    -- no")
     MESSAGE(STATUS "Force the OTB_USE_EXTERNAL_BOOST value to OFF.")
     SET(OTB_USE_EXTERNAL_BOOST OFF CACHE BOOL  "Use an outside build of Boost." FORCE )
   ENDIF(BOOST_IS_COMPLETE)
-- 
GitLab