summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake')
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
new file mode 100644
index 0000000..8e01c8c
--- /dev/null
+++ b/Tests/RunCMake/Ninja/CustomCommandWorkingDirectory.cmake
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.5)
+project(hello NONE)
+
+add_custom_command(
+ OUTPUT hello.copy.c
+ COMMAND "${CMAKE_COMMAND}" -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/hello.c"
+ hello.copy.c
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ )
+add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hello.copy.c")
+
+include(CheckNoPrefixSubDir.cmake)