diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-12-08 13:52:56 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-12-13 15:54:56 (GMT) |
commit | 7480fa0a5fd0ebc3fe06c702f3368e06a50c10ab (patch) | |
tree | 1b2e7a5a5a2a6297a763385535c233817f53d5e8 /Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake | |
parent | ff875ed8591afdb87055b8e43b1fcd04438a4d1e (diff) | |
download | CMake-7480fa0a5fd0ebc3fe06c702f3368e06a50c10ab.zip CMake-7480fa0a5fd0ebc3fe06c702f3368e06a50c10ab.tar.gz CMake-7480fa0a5fd0ebc3fe06c702f3368e06a50c10ab.tar.bz2 |
COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
Diffstat (limited to 'Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake index a419cc9..4dd01db 100644 --- a/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake @@ -2,3 +2,16 @@ include(RunCMake) run_cmake(empty_keyword_args) run_cmake(unknown_imported_target) + + +macro(run_cmake_build test) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${test} ${CMAKE_COMMAND} --build . --config Release) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) +endmacro() + +run_cmake(remove_leading_minusD) +run_cmake_build(remove_leading_minusD) |