diff options
-rw-r--r-- | CMakeInstallation.cmake | 40 | ||||
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | config/cmake/HDF518_Examples.cmake.in | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/h5repack/CMakeTests.cmake | 4 |
5 files changed, 38 insertions, 42 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 29791a3..5f1f8e1 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -596,24 +596,28 @@ The HDF5 data model, file format, API, library, and tools are open and distribut GROUP Applications INSTALL_TYPES Full Developer User ) - CPACK_ADD_COMPONENT (hlcpplibraries - DISPLAY_NAME "HDF5 HL C++ Libraries" - DEPENDS hllibraries - GROUP Runtime - INSTALL_TYPES Full Developer User - ) - CPACK_ADD_COMPONENT (hlcppheaders - DISPLAY_NAME "HDF5 HL C++ Headers" - DEPENDS hlcpplibraries - GROUP Development - INSTALL_TYPES Full Developer - ) - CPACK_ADD_COMPONENT (hlfortlibraries - DISPLAY_NAME "HDF5 HL Fortran Libraries" - DEPENDS fortlibraries - GROUP Runtime - INSTALL_TYPES Full Developer User - ) + if (HDF5_BUILD_CPP_LIB) + CPACK_ADD_COMPONENT (hlcpplibraries + DISPLAY_NAME "HDF5 HL C++ Libraries" + DEPENDS hllibraries + GROUP Runtime + INSTALL_TYPES Full Developer User + ) + CPACK_ADD_COMPONENT (hlcppheaders + DISPLAY_NAME "HDF5 HL C++ Headers" + DEPENDS hlcpplibraries + GROUP Development + INSTALL_TYPES Full Developer + ) + endif (HDF5_BUILD_CPP_LIB) + if (HDF5_BUILD_FORTRAN) + CPACK_ADD_COMPONENT (hlfortlibraries + DISPLAY_NAME "HDF5 HL Fortran Libraries" + DEPENDS fortlibraries + GROUP Runtime + INSTALL_TYPES Full Developer User + ) + endif (HDF5_BUILD_FORTRAN) endif (HDF5_BUILD_HL_LIB) endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f73ec..1cacc5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -813,6 +813,16 @@ if (BUILD_TESTING) endif (BUILD_TESTING) #----------------------------------------------------------------------------- +# Option to build HDF5 Tools +#----------------------------------------------------------------------------- +if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") + option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) + if (HDF5_BUILD_TOOLS) + add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) + endif (HDF5_BUILD_TOOLS) +endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") + +#----------------------------------------------------------------------------- # Option to build examples #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") @@ -894,16 +904,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") #----------------------------------------------------------------------------- -# Option to build HDF5 Tools -#----------------------------------------------------------------------------- -if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") - option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON) - if (HDF5_BUILD_TOOLS) - add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) - endif (HDF5_BUILD_TOOLS) -endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") - -#----------------------------------------------------------------------------- # Check if Fortran's default real is double precision. If it is and HL is # being built then configure should fail due to bug HDFFV-889. #----------------------------------------------------------------------------- diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index d767f51..febf20a 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -21,7 +21,7 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON") ############################################################################################################### if(WIN32) if(STATICLIBRARIES) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF") + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") endif(STATICLIBRARIES) set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake") set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) @@ -29,7 +29,7 @@ if(WIN32) set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") else(WIN32) if(STATICLIBRARIES) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") endif(STATICLIBRARIES) set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake") set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 68f7847..e5f7e2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -770,16 +770,8 @@ set (H5_PRIVATE_HEADERS # Setup the H5Detect utility which generates H5Tinit with platform # specific type checks inside #----------------------------------------------------------------------------- -#add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) -#TARGET_C_PROPERTIES (H5detect STATIC " " " ") -IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - SET (LOCAL_OPT_FLAG "-O0") -ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - SET (LOCAL_OPT_FLAG " ") -ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) -ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) -TARGET_C_PROPERTIES (H5detect STATIC ${LOCAL_OPT_FLAG} " ") - +add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) +TARGET_C_PROPERTIES (H5detect STATIC " " " ") if (MSVC OR MINGW) target_link_libraries (H5detect "ws2_32.lib") endif (MSVC OR MINGW) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 3391c3f..efaa6e5 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -341,7 +341,7 @@ ENDMACRO (ADD_H5_TEST_META) MACRO (ADD_H5_UD_TEST testname resultcode resultfile) - if (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( NAME H5REPACK_UD-${testname}-clearall-objects @@ -382,7 +382,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}") - endif (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_UD_TEST) ############################################################################## |