Tests/QtAutogen: Avoid touching files in the source tree
This commit is contained in:
parent
3f7c7c6596
commit
15f1a6b499
|
@ -147,7 +147,7 @@ set(timeformat "%Y%j%H%M%S")
|
||||||
file(TIMESTAMP "${qrc_file1}" file1_before "${timeformat}")
|
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 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 .
|
execute_process(COMMAND "${CMAKE_COMMAND}" --build .
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends"
|
||||||
|
|
|
@ -15,9 +15,12 @@ else()
|
||||||
set(QT_CORE_TARGET Qt5::Core)
|
set(QT_CORE_TARGET Qt5::Core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
configure_file(res1.qrc.in res1.qrc @ONLY)
|
||||||
|
configure_file(res1_input.txt.in res1_input.txt @ONLY)
|
||||||
|
|
||||||
add_executable(test_res1
|
add_executable(test_res1
|
||||||
test_res1.cpp
|
test_res1.cpp
|
||||||
res1.qrc
|
${CMAKE_CURRENT_BINARY_DIR}/res1.qrc
|
||||||
)
|
)
|
||||||
target_link_libraries(test_res1 ${QT_CORE_TARGET})
|
target_link_libraries(test_res1 ${QT_CORE_TARGET})
|
||||||
add_custom_command(TARGET test_res1 POST_BUILD COMMAND
|
add_custom_command(TARGET test_res1 POST_BUILD COMMAND
|
||||||
|
|
Loading…
Reference in New Issue