Skip to content
Snippets Groups Projects
Commit 1c8df3f1 authored by Timo Koch's avatar Timo Koch
Browse files

[cmake][dune_add_test] Rename DOSOMETHING to SHOULD_SKIP_TEST

parent dc61d9a3
Branches
Tags
1 merge request!405[cmake][dune_add_test] Fix cmake guard and skipping tests
......@@ -231,18 +231,18 @@ function(dune_add_test)
endif()
# Find out whether this test should be a dummy
set(DOSOMETHING TRUE)
set(SHOULD_SKIP_TEST FALSE)
set(FAILED_CONDITION_PRINTING "")
foreach(condition ${ADDTEST_CMAKE_GUARD})
separate_arguments(condition)
if(NOT (${condition}))
set(DOSOMETHING FALSE)
set(SHOULD_SKIP_TEST TRUE)
set(FAILED_CONDITION_PRINTING "${FAILED_CONDITION_PRINTING}std::cout << \" ${condition}\" << std::endl;\n")
endif()
endforeach()
# If we do nothing, switch the sources for a dummy source
if(NOT DOSOMETHING)
if(SHOULD_SKIP_TEST)
dune_module_path(MODULE dune-common RESULT scriptdir SCRIPT_DIR)
set(ADDTEST_TARGET)
set(dummymain ${CMAKE_CURRENT_BINARY_DIR}/main77_${ADDTEST_NAME}.cc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment