diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-16 08:24:24 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-16 08:24:24 (GMT) |
commit | 3b409643bd0f69d38d91bba6b64250e48b276398 (patch) | |
tree | a9f97f280e9599c7504ddc751edd8c4553be066d /Tests/RunCMake/add_custom_command | |
parent | 445ff5ccdf7f888b48d12076fb42ca856482779f (diff) | |
download | CMake-3b409643bd0f69d38d91bba6b64250e48b276398.zip CMake-3b409643bd0f69d38d91bba6b64250e48b276398.tar.gz CMake-3b409643bd0f69d38d91bba6b64250e48b276398.tar.bz2 |
Byproducts: Add test for collapsing of full paths in byproducts
Add test for collapsing of full paths in byproducts and additional tests for
the GENERATED source file properties set by add_custom_command and
add_custom_target with relative paths.
Diffstat (limited to 'Tests/RunCMake/add_custom_command')
-rw-r--r-- | Tests/RunCMake/add_custom_command/GeneratedProperty.cmake | 10 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/RunCMakeTest.cmake | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake b/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake new file mode 100644 index 0000000..628134b --- /dev/null +++ b/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake @@ -0,0 +1,10 @@ +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a" + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/b" + COMMAND c + ) +get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED) +get_source_file_property(GENERATED_B "${CMAKE_CURRENT_BINARY_DIR}/b" GENERATED) +if(NOT GENERATED_A OR NOT GENERATED_B) + message(FATAL_ERROR "failed") +endif() diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake index 0387dbb..20097b7 100644 --- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake @@ -3,6 +3,7 @@ include(RunCMake) run_cmake(AppendNoOutput) run_cmake(AppendNotOutput) run_cmake(BadArgument) +run_cmake(GeneratedProperty) run_cmake(NoArguments) run_cmake(NoOutputOrTarget) run_cmake(OutputAndTarget) |