diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/mccacheinit.cmake | 4 | ||||
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 23 | ||||
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 3 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 5 | ||||
-rw-r--r-- | config/cmake_ext_mod/grepTest.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 8 |
6 files changed, 33 insertions, 14 deletions
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 58cb9cc..3c5b371 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -17,8 +17,6 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE) -set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE) - set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE) set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) @@ -43,7 +41,7 @@ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) -set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) +set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index febe109..3c85d48 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -50,6 +50,17 @@ if (SITE_BUILDNAME_SUFFIX) endif () set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") +# Launchers work only with Makefile and Ninja generators. +if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja") + set(CTEST_USE_LAUNCHERS 0) + set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF") +else() + set(CTEST_USE_LAUNCHERS 1) + set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON") +endif() + #----------------------------------------------------------------------------- # MAC machines need special option #----------------------------------------------------------------------------- @@ -201,22 +212,24 @@ else () set (CTEST_CONFIGURE_ARCHITECTURE "") endif() if (LOCAL_MEMCHECK_TEST) - find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind) + if(LOCAL_USE_VALGRIND) + set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe") + find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) + endif() set (CTEST_CONFIGURE_COMMAND "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) else () if (LOCAL_COVERAGE_TEST) - find_program (CTEST_COVERAGE_COMMAND NAMES gcov) + if(LOCAL_USE_GCOV) + find_program (CTEST_COVERAGE_COMMAND NAMES gcov) + endif () endif () set (CTEST_CONFIGURE_COMMAND "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" ) endif () -set(CTEST_USE_LAUNCHERS 1) -set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1) - #----------------------------------------------------------------------------- ## -- set output to english set ($ENV{LC_MESSAGES} "en_EN") diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index abc88ed..52cb7dd 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -83,9 +83,6 @@ endif () if (WINDOWS) set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") set (${HDF_PREFIX}_HAVE_WIN32_API 1) - set (${HDF_PREFIX}_HAVE_STDDEF_H 1) - set (${HDF_PREFIX}_HAVE_SYS_STAT_H 1) - set (${HDF_PREFIX}_HAVE_SYS_TYPES_H 1) set (${HDF_PREFIX}_HAVE_LIBM 1) set (${HDF_PREFIX}_HAVE_STRDUP 1) set (${HDF_PREFIX}_HAVE_SYSTEM 1) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 148e9d7..d1d9a6c 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -372,8 +372,13 @@ macro (HDF_DIR_PATHS package_prefix) endif () endif () + # Always use full RPATH, i.e. don't skip the full RPATH for the build tree set (CMAKE_SKIP_BUILD_RPATH FALSE) + # when building, don't use the install RPATH already + # (but later on when installing) set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) if (APPLE) set (CMAKE_INSTALL_NAME_DIR "@rpath") diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 78ee0da..a6f1c7f 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -100,7 +100,9 @@ if (TEST_ERRREF) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) - file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) + endif () #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 6f633f3..0c4a5a0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -207,7 +207,9 @@ if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) - file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) + endif () #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif () @@ -271,7 +273,9 @@ if (NOT TEST_SKIP_COMPARE) if (TEST_ERRREF) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) - file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) + if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) + endif () #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") endif () |