From bfc9897c151b133da0381dc1e4bdcb46da0f7dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Thu, 18 Jul 2024 11:47:57 +0200 Subject: [PATCH] Use macro instead of function Proper return() is supported beginning with CMake 3.25 only --- CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46fb4d95ff..20636f9fd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,12 +25,6 @@ if(POLICY CMP0127) cmake_policy(SET CMP0127 NEW) endif() -# return() should check its arguments -# https://cmake.org/cmake/help/latest/policy/CMP0140.html -if(POLICY CMP0140) - cmake_policy(SET CMP0140 NEW) -endif() - # No in-Source builds ######################################################### # @@ -861,15 +855,14 @@ if(openPMD_BUILD_TESTING) target_compile_definitions(CatchRunner PUBLIC openPMD_HAVE_MPI=1) endif() - function(additional_testing_sources test_name out_list) + macro(additional_testing_sources test_name out_list) if(${test_name} STREQUAL "SerialIO") list(APPEND ${out_list} test/Files_SerialIO/close_iteration_test.cpp test/Files_SerialIO/filebased_write_test.cpp ) endif() - return(PROPAGATE ${out_list}) - endfunction() + endmacro() foreach(testname ${openPMD_TEST_NAMES}) set(ADDITIONAL_SOURCE_FILES "")