diff options
Diffstat (limited to 'Tests/RunCMake/add_custom_target')
4 files changed, 47 insertions, 3 deletions
diff --git a/Tests/RunCMake/add_custom_target/BadByproduct-result.txt b/Tests/RunCMake/add_custom_target/BadByproduct-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/add_custom_target/BadByproduct-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt new file mode 100644 index 0000000..7390e6a --- /dev/null +++ b/Tests/RunCMake/add_custom_target/BadByproduct-stderr.txt @@ -0,0 +1,36 @@ +CMake Error at BadByproduct.cmake:2 \(add_custom_target\): + add_custom_target called with BYPRODUCTS containing a "#". This character + is not allowed. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at BadByproduct.cmake:3 \(add_custom_target\): + add_custom_target called with BYPRODUCTS containing a "<". This character + is not allowed. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at BadByproduct.cmake:4 \(add_custom_target\): + add_custom_target called with BYPRODUCTS containing a ">". This character + is not allowed. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at BadByproduct.cmake:5 \(add_custom_target\): + add_custom_target called with BYPRODUCTS containing a "<". This character + is not allowed. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error at BadByproduct.cmake:6 \(add_custom_target\): + add_custom_target attempted to have a file + + .*/j".* + + in a source directory as an output of custom command. +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 new file mode 100644 index 0000000..963d641 --- /dev/null +++ b/Tests/RunCMake/add_custom_target/BadByproduct.cmake @@ -0,0 +1,6 @@ +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(i BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/j COMMAND k) diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake index 49c7d3e..f5d5dd2 100644 --- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake @@ -1,11 +1,12 @@ include(RunCMake) -run_cmake(CommandExpandsEmpty) -run_cmake(GeneratedProperty) -run_cmake(NoArguments) +run_cmake(BadByproduct) run_cmake(BadTargetName) run_cmake(ByproductsNoCommand) +run_cmake(CommandExpandsEmpty) +run_cmake(GeneratedProperty) run_cmake(LiteralQuotes) +run_cmake(NoArguments) run_cmake(UsesTerminalNoCommand) function(run_TargetOrder) |