From 9cad44dce264b509afc4b50b540b3a8594cf3217 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 2 Mar 2017 17:07:53 +0100 Subject: Autogen: Test: Rename autorcc_depends test to rccDepends --- Tests/QtAutogen/CMakeLists.txt | 14 ++++++------ Tests/QtAutogen/autorcc_depends/CMakeLists.txt | 27 ----------------------- Tests/QtAutogen/autorcc_depends/res1.qrc.in | 5 ----- Tests/QtAutogen/autorcc_depends/res1/input.txt.in | 1 - Tests/QtAutogen/autorcc_depends/test_res1.cpp | 5 ----- Tests/QtAutogen/rccDepends/CMakeLists.txt | 27 +++++++++++++++++++++++ Tests/QtAutogen/rccDepends/res1.qrc.in | 5 +++++ Tests/QtAutogen/rccDepends/res1/input.txt.in | 1 + Tests/QtAutogen/rccDepends/test_res1.cpp | 5 +++++ 9 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 Tests/QtAutogen/autorcc_depends/CMakeLists.txt delete mode 100644 Tests/QtAutogen/autorcc_depends/res1.qrc.in delete mode 100644 Tests/QtAutogen/autorcc_depends/res1/input.txt.in delete mode 100644 Tests/QtAutogen/autorcc_depends/test_res1.cpp create mode 100644 Tests/QtAutogen/rccDepends/CMakeLists.txt create mode 100644 Tests/QtAutogen/rccDepends/res1.qrc.in create mode 100644 Tests/QtAutogen/rccDepends/res1/input.txt.in create mode 100644 Tests/QtAutogen/rccDepends/test_res1.cpp diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 4960472..4b84486 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -83,19 +83,19 @@ target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) # -- Test # When a file listed in a .qrc file changes the target must be rebuilt try_compile(RCC_DEPENDS - "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends" - "${CMAKE_CURRENT_SOURCE_DIR}/autorcc_depends" - autorcc_depends + "${CMAKE_CURRENT_BINARY_DIR}/rccDepends" + "${CMAKE_CURRENT_SOURCE_DIR}/rccDepends" + rccDepends CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" "-DQT_TEST_VERSION=${QT_TEST_VERSION}" "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" OUTPUT_VARIABLE output ) if (NOT RCC_DEPENDS) - message(SEND_ERROR "Initial build of autorcc_depends failed. Output: ${output}") + message(SEND_ERROR "Initial build of rccDepends failed. Output: ${output}") endif() -file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends/info_file.txt" qrc_files) +file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/info_file.txt" qrc_files) list(GET qrc_files 0 qrc_file1) @@ -104,10 +104,10 @@ 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_BINARY_DIR}/autorcc_depends/res1/input.txt") +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_CURRENT_BINARY_DIR}/rccDepends/res1/input.txt") execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/autorcc_depends" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rccDepends" ) file(TIMESTAMP "${qrc_file1}" file1_step1 "${timeformat}") diff --git a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt b/Tests/QtAutogen/autorcc_depends/CMakeLists.txt deleted file mode 100644 index 7b51e11..0000000 --- a/Tests/QtAutogen/autorcc_depends/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -cmake_minimum_required(VERSION 3.7) -project(autorcc_depends) - -set(CMAKE_AUTORCC ON) - -if (QT_TEST_VERSION STREQUAL 4) - find_package(Qt4 REQUIRED) - set(QT_CORE_TARGET Qt4::QtCore) -else() - if (NOT QT_TEST_VERSION STREQUAL 5) - message(SEND_ERROR "Invalid Qt version specified.") - endif() - - find_package(Qt5Core REQUIRED) - 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 - ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc -) -target_link_libraries(test_res1 ${QT_CORE_TARGET}) -add_custom_command(TARGET test_res1 POST_BUILD COMMAND - ${CMAKE_COMMAND} -E echo "$" > info_file.txt) diff --git a/Tests/QtAutogen/autorcc_depends/res1.qrc.in b/Tests/QtAutogen/autorcc_depends/res1.qrc.in deleted file mode 100644 index 2a5417b..0000000 --- a/Tests/QtAutogen/autorcc_depends/res1.qrc.in +++ /dev/null @@ -1,5 +0,0 @@ - - - res1/input.txt - - diff --git a/Tests/QtAutogen/autorcc_depends/res1/input.txt.in b/Tests/QtAutogen/autorcc_depends/res1/input.txt.in deleted file mode 100644 index da62762..0000000 --- a/Tests/QtAutogen/autorcc_depends/res1/input.txt.in +++ /dev/null @@ -1 +0,0 @@ -Res1 input. diff --git a/Tests/QtAutogen/autorcc_depends/test_res1.cpp b/Tests/QtAutogen/autorcc_depends/test_res1.cpp deleted file mode 100644 index 766b775..0000000 --- a/Tests/QtAutogen/autorcc_depends/test_res1.cpp +++ /dev/null @@ -1,5 +0,0 @@ - -int main() -{ - return 0; -} diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt new file mode 100644 index 0000000..c983420 --- /dev/null +++ b/Tests/QtAutogen/rccDepends/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.7) +project(rccDepends) + +set(CMAKE_AUTORCC ON) + +if (QT_TEST_VERSION STREQUAL 4) + find_package(Qt4 REQUIRED) + set(QT_CORE_TARGET Qt4::QtCore) +else() + if (NOT QT_TEST_VERSION STREQUAL 5) + message(SEND_ERROR "Invalid Qt version specified.") + endif() + + find_package(Qt5Core REQUIRED) + 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 + ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc +) +target_link_libraries(test_res1 ${QT_CORE_TARGET}) +add_custom_command(TARGET test_res1 POST_BUILD COMMAND + ${CMAKE_COMMAND} -E echo "$" > info_file.txt) diff --git a/Tests/QtAutogen/rccDepends/res1.qrc.in b/Tests/QtAutogen/rccDepends/res1.qrc.in new file mode 100644 index 0000000..2a5417b --- /dev/null +++ b/Tests/QtAutogen/rccDepends/res1.qrc.in @@ -0,0 +1,5 @@ + + + res1/input.txt + + diff --git a/Tests/QtAutogen/rccDepends/res1/input.txt.in b/Tests/QtAutogen/rccDepends/res1/input.txt.in new file mode 100644 index 0000000..da62762 --- /dev/null +++ b/Tests/QtAutogen/rccDepends/res1/input.txt.in @@ -0,0 +1 @@ +Res1 input. diff --git a/Tests/QtAutogen/rccDepends/test_res1.cpp b/Tests/QtAutogen/rccDepends/test_res1.cpp new file mode 100644 index 0000000..766b775 --- /dev/null +++ b/Tests/QtAutogen/rccDepends/test_res1.cpp @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} -- cgit v0.12