summaryrefslogtreecommitdiffstats
path: root/config/cmake/scripts/CTestScript.cmake
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-14 17:28:27 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-14 17:28:27 (GMT)
commitd46ea2d08af456f1cfaf6c6fd3060f39b92be8de (patch)
tree3b7ce8804ae917fd71e995a39b4ccb08d2aa7169 /config/cmake/scripts/CTestScript.cmake
parent156baee37112996291f9ff07760be047d0e03c76 (diff)
parent71b817038d8cd82163cf71119873b2ba65a2c81b (diff)
downloadhdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.zip
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.gz
hdf5-d46ea2d08af456f1cfaf6c6fd3060f39b92be8de.tar.bz2
merge and fix conflicts
Diffstat (limited to 'config/cmake/scripts/CTestScript.cmake')
-rw-r--r--config/cmake/scripts/CTestScript.cmake23
1 files changed, 18 insertions, 5 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index febe109..3c85d48 100644
--- 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")