From: Matthias Maier Date: Fri, 4 May 2018 20:34:27 +0000 (-0500) Subject: use internal target instead of stable IF(TEST ...) X-Git-Tag: v9.0.0-rc1~9^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6453%2Fhead;p=dealii.git use internal target instead of stable IF(TEST ...) --- diff --git a/tests/a-framework/CMakeLists.txt b/tests/a-framework/CMakeLists.txt index 8579920d4b..ef2a36b235 100644 --- a/tests/a-framework/CMakeLists.txt +++ b/tests/a-framework/CMakeLists.txt @@ -12,23 +12,15 @@ DEAL_II_PICKUP_TESTS() # # Limit concurrency between the two parameter file tests. # -# We only do this for CMake-3.4 or newer that has policy CMP0064 and -# supports the IF(TEST ...) operator. For older CMake versions that do not -# support the IF(TEST ...) operator we cannot much do (and people have to -# live with spurious test failures.) -# -IF(POLICY CMP0064) - CMAKE_POLICY(SET CMP0064 NEW) - FOREACH(_build ${DEAL_II_BUILD_TYPES}) - STRING(TOLOWER ${_build} _build) - IF( TEST a-framework/parameter_file_2.${_build} AND - TEST a-framework/parameter_file_1.${_build} ) - SET_TESTS_PROPERTIES(a-framework/parameter_file_2.${_build} PROPERTIES - DEPENDS a-framework/parameter_file_1.${_build} - ) - ENDIF() - ENDFOREACH() -ENDIF() +FOREACH(_build ${DEAL_II_BUILD_TYPES}) + STRING(TOLOWER ${_build} _build) + IF(TARGET parameter_file_2.${_build}.diff AND + TARGET parameter_file_1.${_build}.diff ) + SET_TESTS_PROPERTIES(a-framework/parameter_file_2.${_build} PROPERTIES + DEPENDS a-framework/parameter_file_1.${_build} + ) + ENDIF() +ENDFOREACH() #