From df7a58898e0231f05b57f14889f5220755e8b006 Mon Sep 17 00:00:00 2001 From: "Charlton, Scott R" Date: Thu, 12 Jan 2023 19:48:33 -0700 Subject: [PATCH] Adding submission to cdash --- .gitignore | 3 +++ CMakeLists.txt | 2 +- CTestConfig.cmake | 17 ++++++++++++++++- ctest.cmake | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 ctest.cmake diff --git a/.gitignore b/.gitignore index f39f7330..01e36937 100644 --- a/.gitignore +++ b/.gitignore @@ -209,3 +209,6 @@ doc/RELEASE /unit/unit.opt /unit/unit.plg /unit/x64 + +# builds (folders beginning with _ (underscore) +/_* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index d91e6fa1..eb578d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # CMAKE_MSVC_RUNTIME_LIBRARY requires 3.15 -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.20) project ( IPhreeqc diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 678872cc..e67b9aa1 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -1 +1,16 @@ -set (CTEST_PROJECT_NAME "IPhreeqc") +## This file should be placed in the root directory of your project. +## Then modify the CMakeLists.txt file in the root directory of your +## project to incorporate the testing dashboard. +## +## # The following are required to submit to the CDash dashboard: +## ENABLE_TESTING() +## INCLUDE(CTest) + +set(CTEST_PROJECT_NAME "iphreeqc") +set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") + +set(CTEST_DROP_METHOD "https") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=iphreeqc") +set(CTEST_DROP_SITE_CDASH TRUE) + diff --git a/ctest.cmake b/ctest.cmake new file mode 100644 index 00000000..7904e0b6 --- /dev/null +++ b/ctest.cmake @@ -0,0 +1,32 @@ +include(CTestConfig.cmake) + +site_name(CTEST_SITE) +set(CTEST_BUILD_NAME ${CMAKE_HOST_SYSTEM_NAME}) + +set(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}") +set(CTEST_BINARY_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/_ctest") + +##set(ENV{CXXFLAGS} "--coverage") +set(CTEST_CMAKE_GENERATOR Ninja) +set(CTEST_CONFIGURATION_TYPE Debug) +set(CTEST_BUILD_CONFIGURATION Debug) +set(CTEST_USE_LAUNCHERS 1) + +set(CTEST_UPDATE_TYPE git) +set(CTEST_UPDATE_COMMAND git) +set(CTEST_UPDATE_VERSION_ONLY TRUE) + +##set(CTEST_COVERAGE_COMMAND "gcov") +find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) + +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) +ctest_start("Continuous") +ctest_update() +ctest_configure() +ctest_build() +ctest_test() +#ctest_coverage() +if (CTEST_MEMORYCHECK_COMMAND) + ctest_memcheck() +endif() +ctest_submit()