Autogen: Test: Rename automoc_rerun test to mocRerun

This commit is contained in:
Sebastian Holtermann
2017-03-02 17:13:41 +01:00
parent 9cad44dce2
commit 89780663b3
7 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -119,26 +119,26 @@ endif()
# -- Test # -- Test
# Ensure a repeated build succeeds when a header containing a QObject changes # Ensure a repeated build succeeds when a header containing a QObject changes
try_compile(MOC_RERUN try_compile(MOC_RERUN
"${CMAKE_CURRENT_BINARY_DIR}/automoc_rerun" "${CMAKE_CURRENT_BINARY_DIR}/mocRerun"
"${CMAKE_CURRENT_SOURCE_DIR}/automoc_rerun" "${CMAKE_CURRENT_SOURCE_DIR}/mocRerun"
automoc_rerun mocRerun
CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" CMAKE_FLAGS "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
"-DQT_TEST_VERSION=${QT_TEST_VERSION}" "-DQT_TEST_VERSION=${QT_TEST_VERSION}"
"-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}" "-DCMAKE_PREFIX_PATH=${Qt_PREFIX_DIR}"
OUTPUT_VARIABLE output OUTPUT_VARIABLE output
) )
if (NOT MOC_RERUN) if (NOT MOC_RERUN)
message(SEND_ERROR "Initial build of automoc_rerun failed. Output: ${output}") message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}")
endif() endif()
configure_file(automoc_rerun/test1.h.in2 automoc_rerun/test1.h COPYONLY) configure_file(mocRerun/test1b.h.in mocRerun/test1.h COPYONLY)
execute_process(COMMAND "${CMAKE_COMMAND}" --build . execute_process(COMMAND "${CMAKE_COMMAND}" --build .
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/automoc_rerun" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mocRerun"
RESULT_VARIABLE automoc_rerun_result RESULT_VARIABLE automoc_rerun_result
) )
if (automoc_rerun_result) if (automoc_rerun_result)
message(SEND_ERROR "Second build of automoc_rerun failed.") message(SEND_ERROR "Second build of mocRerun failed.")
endif() endif()
# -- Test # -- Test
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.7) cmake_minimum_required(VERSION 3.7)
project(automoc_rerun CXX) project(mocRerun CXX)
if (QT_TEST_VERSION STREQUAL 4) if (QT_TEST_VERSION STREQUAL 4)
find_package(Qt4 REQUIRED) find_package(Qt4 REQUIRED)
@@ -16,7 +16,7 @@ endif()
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
configure_file(test1.h.in1 test1.h COPYONLY) configure_file(test1a.h.in test1.h COPYONLY)
add_executable(test1 add_executable(test1
${CMAKE_CURRENT_BINARY_DIR}/test1.h ${CMAKE_CURRENT_BINARY_DIR}/test1.h