diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-16 14:59:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-21 15:38:49 (GMT) |
commit | 39c4819eaa4f680411a63701b1303d79a088aece (patch) | |
tree | 1588c2a9e6d0595552e542791bee12cc821c450d /Tests/QtAutogen/mocIncludeStrict | |
parent | 50805693ba987fbf86bb5e8263d7b427cd4da0c2 (diff) | |
download | CMake-39c4819eaa4f680411a63701b1303d79a088aece.zip CMake-39c4819eaa4f680411a63701b1303d79a088aece.tar.gz CMake-39c4819eaa4f680411a63701b1303d79a088aece.tar.bz2 |
Autogen: Tests: Add moc include tests
Diffstat (limited to 'Tests/QtAutogen/mocIncludeStrict')
-rw-r--r-- | Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt | 18 | ||||
-rw-r--r-- | Tests/QtAutogen/mocIncludeStrict/main.cpp | 14 |
2 files changed, 32 insertions, 0 deletions
diff --git a/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt new file mode 100644 index 0000000..22e93a8 --- /dev/null +++ b/Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt @@ -0,0 +1,18 @@ +# Test moc include patterns + +set(CMAKE_AUTOMOC_RELAXED_MODE FALSE) + +include_directories("../mocInclude") + +add_executable(mocIncludeStrict + ../mocInclude/ObjA.cpp + ../mocInclude/ObjB.cpp + ../mocInclude/ObjC.cpp + ../mocInclude/ObjD.cpp + ../mocInclude/subA/SubObjA.cpp + ../mocInclude/subB/SubObjB.cpp + ../mocInclude/subC/SubObjC.cpp + main.cpp +) +target_link_libraries(mocIncludeStrict ${QT_LIBRARIES}) +set_target_properties(mocIncludeStrict PROPERTIES AUTOMOC ON) diff --git a/Tests/QtAutogen/mocIncludeStrict/main.cpp b/Tests/QtAutogen/mocIncludeStrict/main.cpp new file mode 100644 index 0000000..142d59e --- /dev/null +++ b/Tests/QtAutogen/mocIncludeStrict/main.cpp @@ -0,0 +1,14 @@ +#include "ObjA.hpp" +#include "ObjB.hpp" +#include "ObjC.hpp" + +int main(int argv, char** args) +{ + ObjA objA; + ObjB objB; + ObjC objC; + return 0; +} + +// Header in global subdirectory +#include "subB/moc_SubObjB.cpp" |