diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-08 16:29:23 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:48:27 (GMT) |
commit | 0b8597a86ee8bed2c34f52d309fd57b5f29a1595 (patch) | |
tree | 912e41e02cc0e562fca2caa9897e1e850359611b /Tests/QtAutogen/MocOptions | |
parent | 227a7974f426e0966d1736c66dd606b068985d1b (diff) | |
download | CMake-0b8597a86ee8bed2c34f52d309fd57b5f29a1595.zip CMake-0b8597a86ee8bed2c34f52d309fd57b5f29a1595.tar.gz CMake-0b8597a86ee8bed2c34f52d309fd57b5f29a1595.tar.bz2 |
Autogen: Tests: Separate mocOnly and mocOnlyOpts tests
Diffstat (limited to 'Tests/QtAutogen/MocOptions')
-rw-r--r-- | Tests/QtAutogen/MocOptions/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/Object.cpp | 5 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/Object.hpp | 13 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOptions/main.cpp | 7 |
4 files changed, 34 insertions, 0 deletions
diff --git a/Tests/QtAutogen/MocOptions/CMakeLists.txt b/Tests/QtAutogen/MocOptions/CMakeLists.txt new file mode 100644 index 0000000..f64b37b --- /dev/null +++ b/Tests/QtAutogen/MocOptions/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.10) +project(MocOptions) +include("../AutogenTest.cmake") + +# Test extra options passed to moc via AUTOMOC_MOC_OPTIONS +add_executable(mocOptions Object.cpp main.cpp) +set_property(TARGET mocOptions PROPERTY AUTOMOC ON) +set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-nw") +target_link_libraries(mocOptions ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/MocOptions/Object.cpp b/Tests/QtAutogen/MocOptions/Object.cpp new file mode 100644 index 0000000..ad109f1 --- /dev/null +++ b/Tests/QtAutogen/MocOptions/Object.cpp @@ -0,0 +1,5 @@ +#include "Object.hpp" + +Object::Object() +{ +} diff --git a/Tests/QtAutogen/MocOptions/Object.hpp b/Tests/QtAutogen/MocOptions/Object.hpp new file mode 100644 index 0000000..e7a6142 --- /dev/null +++ b/Tests/QtAutogen/MocOptions/Object.hpp @@ -0,0 +1,13 @@ +#ifndef Object_HPP +#define Object_HPP + +#include <QObject> + +class Object : public QObject +{ + Q_OBJECT +public: + Object(); +}; + +#endif diff --git a/Tests/QtAutogen/MocOptions/main.cpp b/Tests/QtAutogen/MocOptions/main.cpp new file mode 100644 index 0000000..7aeab1a --- /dev/null +++ b/Tests/QtAutogen/MocOptions/main.cpp @@ -0,0 +1,7 @@ +#include "Object.hpp" + +int main(int argv, char** args) +{ + Object object; + return 0; +} |