summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-17 15:11:55 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-17 15:12:08 (GMT)
commite6ddb57479a3620c712719c120a7337a84470d21 (patch)
tree931a053930335da65f0e92d4bf6cebd6260f2056 /Tests/RunCMake
parent14fb0f3967f625264768dc9005e0b3e9191bd6d7 (diff)
parent3b409643bd0f69d38d91bba6b64250e48b276398 (diff)
downloadCMake-e6ddb57479a3620c712719c120a7337a84470d21.zip
CMake-e6ddb57479a3620c712719c120a7337a84470d21.tar.gz
CMake-e6ddb57479a3620c712719c120a7337a84470d21.tar.bz2
Merge topic 'byproduct-collapse-full-path'
3b409643bd Byproducts: Add test for collapsing of full paths in byproducts 445ff5ccdf Byproducts: collapse full paths of custom target byproducts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3804
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/add_custom_command/GeneratedProperty.cmake10
-rw-r--r--Tests/RunCMake/add_custom_command/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/add_custom_target/GeneratedProperty.cmake14
-rw-r--r--Tests/RunCMake/add_custom_target/RunCMakeTest.cmake1
4 files changed, 26 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)
diff --git a/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake b/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake
new file mode 100644
index 0000000..d034534
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/GeneratedProperty.cmake
@@ -0,0 +1,14 @@
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
+ COMMAND b
+ )
+add_custom_target(CollapseFullPath
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/a"
+ BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/c"
+ COMMAND d
+ )
+get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
+get_source_file_property(GENERATED_C "${CMAKE_CURRENT_BINARY_DIR}/c" GENERATED)
+if(NOT GENERATED_A OR NOT GENERATED_C)
+ message(FATAL_ERROR "failed")
+endif()
diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
index 2caed03..d80ca19 100644
--- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
include(RunCMake)
run_cmake(CommandExpandsEmpty)
+run_cmake(GeneratedProperty)
run_cmake(NoArguments)
run_cmake(BadTargetName)
run_cmake(ByproductsNoCommand)