summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-16 17:56:23 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-16 19:06:32 (GMT)
commit15f1a6b49958cc7757f951839b02a00e8c820154 (patch)
tree4bdee4a2e52277bbfd6bf8142e75d903a59ea8b2 /Tests/QtAutogen
parent3f7c7c65968b6d04babd261dab952ee40e0c9ca9 (diff)
downloadCMake-15f1a6b49958cc7757f951839b02a00e8c820154.zip
CMake-15f1a6b49958cc7757f951839b02a00e8c820154.tar.gz
CMake-15f1a6b49958cc7757f951839b02a00e8c820154.tar.bz2
Tests/QtAutogen: Avoid touching files in the source tree
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt2
-rw-r--r--Tests/QtAutogen/autorcc_depends/CMakeLists.txt5
-rw-r--r--Tests/QtAutogen/autorcc_depends/res1.qrc.in (renamed from Tests/QtAutogen/autorcc_depends/res1.qrc)0
-rw-r--r--Tests/QtAutogen/autorcc_depends/res1_input.txt.in (renamed from Tests/QtAutogen/autorcc_depends/res1_input.txt)0
4 files changed, 5 insertions, 2 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 81a70f4..67e0f7e 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -147,7 +147,7 @@ set(timeformat "%Y%j%H%M%S")
file(TIMESTAMP "${qrc_file1}" file1_before "${timeformat}")
execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 1) # Ensure that the timestamp will change.
-execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_SOURCE_DIR}/autorcc_depends/res1_input.txt")
+execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends/res1_input.txt")
execute_process(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends"
diff --git a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt b/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
index 0ba86cf..9faf803 100644
--- a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
+++ b/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
@@ -15,9 +15,12 @@ else()
set(QT_CORE_TARGET Qt5::Core)
endif()
+configure_file(res1.qrc.in res1.qrc @ONLY)
+configure_file(res1_input.txt.in res1_input.txt @ONLY)
+
add_executable(test_res1
test_res1.cpp
- res1.qrc
+ ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc
)
target_link_libraries(test_res1 ${QT_CORE_TARGET})
add_custom_command(TARGET test_res1 POST_BUILD COMMAND
diff --git a/Tests/QtAutogen/autorcc_depends/res1.qrc b/Tests/QtAutogen/autorcc_depends/res1.qrc.in
index cfea618..cfea618 100644
--- a/Tests/QtAutogen/autorcc_depends/res1.qrc
+++ b/Tests/QtAutogen/autorcc_depends/res1.qrc.in
diff --git a/Tests/QtAutogen/autorcc_depends/res1_input.txt b/Tests/QtAutogen/autorcc_depends/res1_input.txt.in
index da62762..da62762 100644
--- a/Tests/QtAutogen/autorcc_depends/res1_input.txt
+++ b/Tests/QtAutogen/autorcc_depends/res1_input.txt.in