mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-24 16:49:18 -06:00
committed by
Brad King
parent
2624006608
commit
5380ad9d58
10
Tests/QtAutogen/MocOptions2/CMakeLists.txt
Normal file
10
Tests/QtAutogen/MocOptions2/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(MocOptions2)
|
||||
include("../AutogenCoreTest.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)
|
||||
target_compile_options(mocOptions PRIVATE "-D_EXTRA_DEFINE")
|
||||
set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-D_EXTRA_DEFINE")
|
||||
target_link_libraries(mocOptions ${QT_LIBRARIES})
|
||||
7
Tests/QtAutogen/MocOptions2/main.cpp
Normal file
7
Tests/QtAutogen/MocOptions2/main.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "object.hpp"
|
||||
|
||||
int main()
|
||||
{
|
||||
Object object;
|
||||
return 0;
|
||||
}
|
||||
5
Tests/QtAutogen/MocOptions2/object.cpp
Normal file
5
Tests/QtAutogen/MocOptions2/object.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "object.hpp"
|
||||
|
||||
Object::Object()
|
||||
{
|
||||
}
|
||||
15
Tests/QtAutogen/MocOptions2/object.hpp
Normal file
15
Tests/QtAutogen/MocOptions2/object.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef Object_HPP
|
||||
#define Object_HPP
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#ifdef _EXTRA_DEFINE
|
||||
class Object : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Object();
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,7 @@ ADD_AUTOGEN_TEST(ManySources manySources)
|
||||
ADD_AUTOGEN_TEST(MocInterfaceMacroNames)
|
||||
ADD_AUTOGEN_TEST(MocOnly mocOnly)
|
||||
ADD_AUTOGEN_TEST(MocOptions mocOptions)
|
||||
ADD_AUTOGEN_TEST(MocOptions2)
|
||||
ADD_AUTOGEN_TEST(ObjectLibrary someProgram)
|
||||
ADD_AUTOGEN_TEST(Parallel parallel)
|
||||
ADD_AUTOGEN_TEST(Parallel1 parallel1)
|
||||
|
||||
Reference in New Issue
Block a user