diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-11-29 17:11:01 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2016-11-29 17:46:39 (GMT) |
commit | 6938772a114099df406bc72cbc98a3c8d57cd458 (patch) | |
tree | 92f7c8871a6e35b0186afd77a5f8acbadeb269a9 /Tests/QtAutogen/CMakeLists.txt | |
parent | c4d4becf8b79f68534eb8320ccd63218afa4ca31 (diff) | |
download | CMake-6938772a114099df406bc72cbc98a3c8d57cd458.zip CMake-6938772a114099df406bc72cbc98a3c8d57cd458.tar.gz CMake-6938772a114099df406bc72cbc98a3c8d57cd458.tar.bz2 |
QtAutogen tests: Pass Qt compiler features to library targets
Diffstat (limited to 'Tests/QtAutogen/CMakeLists.txt')
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index c0c20f8..c4d0567 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -44,6 +44,7 @@ else() endif() +get_property(QT_COMPILE_FEATURES TARGET ${QT_QTCORE_TARGET} PROPERTY INTERFACE_COMPILE_FEATURES) include_directories(${CMAKE_CURRENT_BINARY_DIR}) # -- Test: AUTORCC @@ -72,11 +73,13 @@ target_link_libraries(uicOnly ${QT_LIBRARIES}) # have an effect on generation if AUTORCC is off. add_library(empty STATIC empty.cpp not_generated_file.qrc) set_target_properties(empty PROPERTIES AUTORCC OFF) - set_target_properties(empty PROPERTIES AUTOMOC TRUE) target_link_libraries(empty no_link_language) add_library(no_link_language STATIC empty.h) set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) +# Pass Qt compiler features to targets that don't link against Qt +target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES}) +target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES}) # -- Test: AUTORCC # When a file listed in a .qrc file changes the target must be rebuilt |