Skip to content
Snippets Groups Projects
Commit efffb029 authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Remove the NO_ADD_ALL_FLAGS argument to dune_add_test

parent 3eaacb22
No related branches found
No related tags found
1 merge request!1207Remove add_dune_all_flags from dune_add_test
Pipeline #77259 passed
Pipeline: Dune Nightly Test

#77268

    ......@@ -24,9 +24,7 @@ SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    allows to run these tests with `ctest -L <module>`.
    - Change the behavior of `dune_add_test`: Do not add all package flags automatically. This new behavior
    can be controlled by the new Dune policy `DP_TEST_ADD_ALL_FLAGS`. The `dune_add_test` macro is also
    extended by the new option `NO_ADD_ALL_FLAGS` to deactivate the `add_dune_all_flags` call when the policy
    is set to `OLD`.
    can be controlled by the new Dune policy `DP_TEST_ADD_ALL_FLAGS`.
    ## C++: Changelog
    ......
    ......@@ -192,12 +192,6 @@
    # place to make it easy to construct regular expressions from the label
    # names for :code:`ctest -L ${label_regex}`.
    #
    # .. cmake_param:: NO_ADD_ALL_FLAGS
    # :option:
    #
    # Disable the call to :ref:`add_dune_all_flags` for the test target if
    # activated globally by the Dune policy `DP_TEST_ADD_ALL_FLAGS=OLD`.
    #
    # This function defines the Dune way of adding a test to the testing suite.
    # You may either add the executable yourself through :ref:`add_executable`
    # and pass it to the :code:`TARGET` option, or you may rely on :ref:`dune_add_test`
    ......@@ -267,7 +261,7 @@ if(NOT DUNE_MAX_TEST_CORES)
    endif()
    function(dune_add_test)
    set(OPTIONS EXPECT_COMPILE_FAIL EXPECT_FAIL SKIP_ON_77 COMPILE_ONLY PYTHON_TEST NO_ADD_ALL_FLAGS)
    set(OPTIONS EXPECT_COMPILE_FAIL EXPECT_FAIL SKIP_ON_77 COMPILE_ONLY PYTHON_TEST)
    set(SINGLEARGS NAME TARGET TIMEOUT WORKING_DIRECTORY)
    set(MULTIARGS SOURCES COMPILE_DEFINITIONS COMPILE_FLAGS LINK_LIBRARIES CMD_ARGS MPI_RANKS COMMAND CMAKE_GUARD LABELS)
    cmake_parse_arguments(ADDTEST "${OPTIONS}" "${SINGLEARGS}" "${MULTIARGS}" ${ARGN})
    ......@@ -363,7 +357,7 @@ function(dune_add_test)
    # add all flags to the target if corresponding policy is OLD and not explicitly disabled.
    dune_policy(GET DP_TEST_ADD_ALL_FLAGS _add_all_flags)
    if(_add_all_flags STREQUAL "OLD" AND NOT NO_ADD_ALL_FLAGS)
    if(_add_all_flags STREQUAL "OLD")
    add_dune_all_flags(${ADDTEST_NAME})
    endif()
    unset(_add_all_flags)
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment