X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=CMakeLists.txt;h=5ff95b1b256b019901b458e1c1ab8a9607bdcb79;hb=0998e973a71f551af2f24ae49c9b748359a61be8;hp=7438ca392ad5193f0759b427c5bd462fb4513cc5;hpb=0007504efe0e9399a5da4f97a63afc88c528c25d;p=gdcm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 7438ca39..5ff95b1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,30 @@ SET (EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output dir SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) +#----------------------------------------------------------------------------- +# Test if compiler defines __FUNCTION__ +IF("GDCM_COMPILER_HAS_FUNCTION" MATCHES "^GDCM_COMPILER_HAS_FUNCTION$") + MESSAGE(STATUS "Checking support for __FUNCTION__ in compiler") + TRY_COMPILE(GDCM_COMPILER_HAS_FUNCTION + ${GDCM_BINARY_DIR}/CMakeTmp/Function + ${GDCM_SOURCE_DIR}/gdcmTestFUNCTION.cxx + OUTPUT_VARIABLE OUTPUT) + IF(GDCM_COMPILER_HAS_FUNCTION) + MESSAGE(STATUS "Checking support for __FUNCTION__ -- yes") + SET(GDCM_COMPILER_HAS_FUNCTION 1 CACHE INTERNAL "Support for extention C __FUNCTION__") + WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log + "Determining if the C compiler supports __FUNCTION__ " + "passed with the following output:\n" + "${OUTPUT}\n" APPEND) + ELSE(GDCM_COMPILER_HAS_FUNCTION) + MESSAGE(STATUS "Checking support for __FUNCTION__ -- no") + SET(GDCM_COMPILER_HAS_FUNCTION 0 CACHE INTERNAL "Support for extension C __FUNCTION__") + WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log + "Determining if the C compiler supports __FUNCTION__ " + "failed with the following output:\n" + "${OUTPUT}\n" APPEND) + ENDIF(GDCM_COMPILER_HAS_FUNCTION) +ENDIF("GDCM_COMPILER_HAS_FUNCTION" MATCHES "^GDCM_COMPILER_HAS_FUNCTION$") #----------------------------------------------------------------------------- # Build directory on which many applications depend SUBDIRS( @@ -62,7 +86,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake) TEST_BIG_ENDIAN(GDCM_WORDS_BIGENDIAN) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) -CHECK_INCLUDE_FILE("stdint.h" CMAKE_HAVE_STDINT_H) +CHECK_INCLUDE_FILE("stdint.h" GDCM_HAVE_STDINT_H) CONFIGURE_FILE(${GDCM_SOURCE_DIR}/gdcmConfigure.h.in ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE) @@ -88,7 +112,7 @@ IF(GDCM_VTK) FIND_PACKAGE(VTK) # If vtk found IF(VTK_FOUND) - INCLUDE(${VTK_USE_FILE}) + #INCLUDE(${VTK_USE_FILE}) SUBDIRS(vtk) ENDIF(VTK_FOUND) ENDIF(GDCM_VTK)