diff --git a/CMakeLists.txt b/CMakeLists.txt index 60d0395376ae0b53338538175733be5c3f0316b0..7b1dd49113daaacbe0eccdaf670e4fe5e397015f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,12 @@ set(output_lib "Base") add_library(${output_lib} STATIC) +# Add option to enable extra parsing of the CTest log +option(BASE_TEST_CTEST_NAMES_ARE_OUTPUT_PATHS "Declare that CTest test names are the same as the test output paths to enable extra CTest log parsing." OFF) +if (BASE_TEST_CTEST_NAMES_ARE_OUTPUT_PATHS) + target_compile_definitions(${output_lib} PRIVATE TEST_REPORT_CTEST_NAMES_ARE_OUTPUT_PATHS) +endif() + function(base_add_subdir subdir) # initialize these variables since ASM is printing warnings otherwise set(my_headers "") diff --git a/Test/TestReport.cc b/Test/TestReport.cc index b33e9a6b1009cbf03fb88f05d4b334820ae43244..d68bfb657d0a9d4028222843791b4c2314846816 100644 --- a/Test/TestReport.cc +++ b/Test/TestReport.cc @@ -281,7 +281,7 @@ void TestList::parse_ctest_log(const fs::path& _ctest_log_path) << "WARNING: There are " << ctest_tests_nmbr << " tests listed in the CTest log, but checksums were recorded " "for only " - << tests_.size() << " tests." << std::endl + << tests_.size() << " test(s)." << std::endl << std::endl; } #endif // TEST_REPORT_CTEST_NAMES_ARE_OUTPUT_PATHS