Tests/QtAutogen: Avoid touching files in the source tree

This commit is contained in:
Brad King 2015-04-16 13:56:23 -04:00
parent 3f7c7c6596
commit 15f1a6b499
4 changed files with 5 additions and 2 deletions

View File

@ -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"

View File

@ -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