diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-11-12 16:50:50 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-11-12 16:50:50 (GMT) |
commit | 14bfa9a99143e9170c5ce2cdfc0c30e40d466dfd (patch) | |
tree | 4ca149140292b31b037aa0bb7f829dcc90846877 /config | |
parent | c768326d6837592040fde08d62b25c86ae0f4acf (diff) | |
download | hdf5-14bfa9a99143e9170c5ce2cdfc0c30e40d466dfd.zip hdf5-14bfa9a99143e9170c5ce2cdfc0c30e40d466dfd.tar.gz hdf5-14bfa9a99143e9170c5ce2cdfc0c30e40d466dfd.tar.bz2 |
Correct TARGET variable and CMake config file location
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDF5PluginMacros.cmake | 4 | ||||
-rw-r--r-- | config/cmake/cacheinit.cmake | 2 | ||||
-rw-r--r-- | config/cmake/jrunTest.cmake | 6 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 11 | ||||
-rw-r--r-- | config/cmake_ext_mod/grepTest.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 6 | ||||
-rw-r--r-- | config/sanitizer/formatting.cmake | 52 | ||||
-rw-r--r-- | config/sanitizer/tools.cmake | 2 |
8 files changed, 19 insertions, 68 deletions
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index 2c9e5e6..46d3979 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -26,7 +26,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) # the hdf5 settings -DHDF5_PACKAGE_NAME:STRING=hdf5 -DHDF5_HDF5_HEADER:STRING=h5pubconf.h - -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}> + -DHDF5_LINK_LIBS:STRING=$<TARGET_LINKER_FILE:${HDF5_LIBSH_TARGET}> -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR} -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME} -DH5PL_CPACK_ENABLE:BOOL=ON @@ -78,7 +78,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) # the hdf5 settings -DHDF5_PACKAGE_NAME:STRING=hdf5 -DHDF5_HDF5_HEADER:STRING=h5pubconf.h - -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}> + -DHDF5_LINK_LIBS:STRING=$<TARGET_LINKER_FILE:${HDF5_LIBSH_TARGET}> -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR} -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME} -DH5PL_CPACK_ENABLE:BOOL=ON diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index f8ab3a2..71c8b4a 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -40,6 +40,8 @@ set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) +set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" FORCE) + set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 41570eb..7d59ce5 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -49,7 +49,7 @@ endif () message (STATUS "COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=${LOG_LEVEL} -Djava.library.path=\"${TEST_LIBRARY_DIRECTORY}\" -cp \"${TEST_CLASSPATH}\" ${TEST_ARGS} ${TEST_PROGRAM} ${ARGN}") -if (WIN32 OR MINGW) +if (WIN32) set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") @@ -131,7 +131,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) @@ -202,7 +202,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index eb0392e..8ca8159 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -143,8 +143,8 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) endif () endif () - #----- Use MSVC Naming conventions for Shared Libraries - if (MINGW AND ${libtype} MATCHES "SHARED") + option (HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF) + if (HDF5_MSVC_NAMING_CONVENTION AND MINGW AND ${libtype} MATCHES "SHARED") set_target_properties (${libtarget} PROPERTIES IMPORT_SUFFIX ".lib" IMPORT_PREFIX "" @@ -343,7 +343,7 @@ macro (HDF_DIR_PATHS package_prefix) set (${package_prefix}_INSTALL_INCLUDE_DIR include) endif () if (NOT ${package_prefix}_INSTALL_DATA_DIR) - if (NOT WIN32) + if (NOT MSVC) if (APPLE) if (${package_prefix}_BUILD_FRAMEWORKS) set (${package_prefix}_INSTALL_EXTRA_DIR ../SharedSupport) @@ -353,12 +353,13 @@ macro (HDF_DIR_PATHS package_prefix) set (${package_prefix}_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) endif () set (${package_prefix}_INSTALL_DATA_DIR share) - set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake) else () set (${package_prefix}_INSTALL_DATA_DIR ".") - set (${package_prefix}_INSTALL_CMAKE_DIR cmake) endif () endif () + if (NOT ${package_prefix}_INSTALL_CMAKE_DIR) + set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake) + endif () # Always use full RPATH, i.e. don't skip the full RPATH for the build tree set (CMAKE_SKIP_BUILD_RPATH FALSE) diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index b011ae8..758b62b 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -46,7 +46,7 @@ endif () message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_LIBRARY_DIRECTORY) - if (WIN32 OR MINGW) + if (WIN32) set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") @@ -105,7 +105,7 @@ if (TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 2b8b6b0..baf15c0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -38,7 +38,7 @@ endif () message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_LIBRARY_DIRECTORY) - if (WIN32 OR MINGW) + if (WIN32) set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") @@ -212,7 +212,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) @@ -283,7 +283,7 @@ if (NOT TEST_SKIP_COMPARE) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) - if (WIN32 OR MINGW) + if (WIN32) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) diff --git a/config/sanitizer/formatting.cmake b/config/sanitizer/formatting.cmake index 677a69a..5aaa2a6 100644 --- a/config/sanitizer/formatting.cmake +++ b/config/sanitizer/formatting.cmake @@ -90,55 +90,3 @@ function(clang_format TARGET_NAME) endif() endfunction() -# -# cmake-format -# -find_program(CMAKE_FORMAT_EXE "cmake-format") -mark_as_advanced(FORCE CMAKE_FORMAT_EXE) -if(CMAKE_FORMAT_EXE) - message(STATUS "cmake-format found: ${CMAKE_FORMAT_EXE}") -else() - message(STATUS "cmake-format not found!") -endif() - -# When called, this function will call 'cmake-format' program on all listed -# files (if both the program and the files exist and are found) -# ~~~ -# Required: -# TARGET_NAME - The name of the target to create. -# -# Optional: -# ARGN - Any arguments passed in will be considered as 'files' to perform the -# formatting on. Any items that are not files will be ignored. Both relative and -# absolute paths are accepted. -# ~~~ -function(cmake_format TARGET_NAME) - if(CMAKE_FORMAT_EXE) - set(FORMAT_FILES) - # Determine files that exist - foreach(iter IN LISTS ARGN) - if(EXISTS ${iter}) - set(FORMAT_FILES ${FORMAT_FILES} ${iter}) - elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${iter}) - set(FORMAT_FILES ${FORMAT_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${iter}) - endif() - endforeach() - - # Generate target - if(FORMAT_FILES) - if(TARGET ${TARGET_NAME}) - message( - ERROR - "Cannot create cmake-format target '${TARGET_NAME}', already exists.") - else() - add_custom_target(${TARGET_NAME} COMMAND ${CMAKE_FORMAT_EXE} -i - ${FORMAT_FILES}) - - if(NOT TARGET cmake-format) - add_custom_target(cmake-format) - endif() - add_dependencies(cmake-format ${TARGET_NAME}) - endif() - endif() - endif() -endfunction() diff --git a/config/sanitizer/tools.cmake b/config/sanitizer/tools.cmake index 2f73cce..242e33f 100644 --- a/config/sanitizer/tools.cmake +++ b/config/sanitizer/tools.cmake @@ -111,4 +111,4 @@ else() set(CMAKE_CXX_CPPCHECK "" CACHE STRING "" FORCE) # delete it -endif()
\ No newline at end of file +endif() |