diff options
author | Glenn Coombs <glenn.coombs@gmail.com> | 2024-05-13 04:09:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-05-15 17:27:46 (GMT) |
commit | 8d2a503c1e65142732ca78d3df60dce9a929dee2 (patch) | |
tree | 19f1b9e880f978d1cec94ddcb327eb2338768bc2 /Tests/RunCMake/add_custom_target | |
parent | b38000d77427e64da55527284f0d397749560890 (diff) | |
download | CMake-8d2a503c1e65142732ca78d3df60dce9a929dee2.zip CMake-8d2a503c1e65142732ca78d3df60dce9a929dee2.tar.gz CMake-8d2a503c1e65142732ca78d3df60dce9a929dee2.tar.bz2 |
add_custom_command: Allow OUTPUT filenames containing a hash '#' character
Most generators now support this character after escaping and quoting
cleanups over time. Disallow it only on generators that do support it.
Fixes: #25604
Diffstat (limited to 'Tests/RunCMake/add_custom_target')
-rw-r--r-- | Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt | 8 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_target/BadByproduct.cmake | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt index da9af49..b734ddd 100644 --- a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt +++ b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt @@ -1,9 +1,3 @@ -CMake Error at BadByproduct.cmake:2 \(add_custom_target\): - BYPRODUCTS containing a "#" is not allowed. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) - - CMake Error at BadByproduct.cmake:3 \(add_custom_target\): BYPRODUCTS containing a "<" is not allowed. Call Stack \(most recent call first\): @@ -17,7 +11,7 @@ Call Stack \(most recent call first\): ( CMake Error at BadByproduct.cmake:5 \(add_custom_target\): - BYPRODUCTS containing a "#" is not allowed. + BYPRODUCTS containing a ">" is not allowed. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_target/BadByproduct.cmake b/Tests/RunCMake/add_custom_target/BadByproduct.cmake index c317b83..d29c02f 100644 --- a/Tests/RunCMake/add_custom_target/BadByproduct.cmake +++ b/Tests/RunCMake/add_custom_target/BadByproduct.cmake @@ -1,8 +1,8 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON) -add_custom_target(a BYPRODUCTS "a#" COMMAND b) + add_custom_target(c BYPRODUCTS "a<" COMMAND d) add_custom_target(e BYPRODUCTS "a>" COMMAND f) -add_custom_target(g BYPRODUCTS "$<CONFIG>/#" COMMAND h) +add_custom_target(g BYPRODUCTS "$<CONFIG>/$<ANGLE-R>" COMMAND h) add_custom_target(i BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/j COMMAND k) add_custom_target(l BYPRODUCTS "$<TARGET_PROPERTY:prop>" COMMAND m) add_custom_target(n BYPRODUCTS "$<OUTPUT_CONFIG:n>" COMMAND o) |