From d50163ae1ccecdc4b9acfe3121f37965dcb7ca85 Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Wed, 17 Oct 2007 14:56:25 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20a=20jour=20du=20CMakeLists.txt=20de=20l'?= =?UTF-8?q?OTB=20suite=20=C3=A0=20la=20mise=20a=20jour=20de=20l'ITK=20en?= =?UTF-8?q?=20Interne.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7c2e4c175..2fb16b6bd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,6 +391,33 @@ IF(WIN32) SET(OTB_REQUIRED_CXX_FLAGS "${OTB_REQUIRED_CXX_FLAGS} -DNOMINMAX") ENDIF(WIN32) +#----------------------------------------------------------------------------- +# Test for an Objective-C++ compiler. +SET(OTB_OBJCXX_COMPILER_WORKS 0) +IF(APPLE) + TRY_COMPILE(OTB_OBJCXX_COMPILER_WORKS + ${OTB_BINARY_DIR}/CMakeTmp + ${OTB_SOURCE_DIR}/CMake/otbTestObjCxxCompiler.mm + OUTPUT_VARIABLE OTB_OBJCXX_TRY_COMPILE_OUTPUT) + IF( OTB_OBJCXX_COMPILER_WORKS ) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Objective-C compiler works passed with " + "the following output:\n${OTB_OBJCXX_TRY_COMPILE_OUTPUT}\n\n") + ELSE( OTB_OBJCXX_COMPILER_WORKS ) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Objective-C compiler works failed with " + "the following output:\n${OTB_OBJCXX_TRY_COMPILE_OUTPUT}\n\n") + ENDIF( OTB_OBJCXX_COMPILER_WORKS ) +ENDIF(APPLE) +#----------------------------------------------------------------------------- +# mingw thread support +IF(MINGW) + SET(OTB_REQUIRED_CXX_FLAGS "${OTB_REQUIRED_CXX_FLAGS} -mthreads") + SET(OTB_REQUIRED_C_FLAGS "${OTB_REQUIRED_C_FLAGS} -mthreads") + SET(OTB_REQUIRED_LINK_FLAGS "${OTB_REQUIRED_LINK_FLAGS} -mthreads") +ENDIF(MINGW) + + #----------------------------------------------------------------------------- # # See if compiler preprocessor has the __FUNCTION__ directive used by itkExceptionMacro -- GitLab