mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-14 02:59:53 -06:00
AUTOGEN: Tests: AUTOUIC SKIP_AUTOUIC and SKIP_AUTOGEN test
This commit is contained in:
@@ -161,6 +161,26 @@ set_property(TARGET skipMocB PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET skipMocB PROPERTY AUTOUIC ON)
|
||||
target_link_libraries(skipMocB ${QT_LIBRARIES})
|
||||
|
||||
# -- Test: AUTOUIC, SKIP_AUTOUIC
|
||||
# Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target
|
||||
set(skipUicSources
|
||||
skipUic.cpp
|
||||
skipSource/skipUicGen.cpp
|
||||
skipSource/skipUicNoGen1.cpp
|
||||
skipSource/skipUicNoGen2.cpp
|
||||
)
|
||||
set_property(SOURCE skipSource/skipUicNoGen1.cpp PROPERTY SKIP_AUTOUIC ON)
|
||||
set_property(SOURCE skipSource/skipUicNoGen2.cpp PROPERTY SKIP_AUTOGEN ON)
|
||||
# AUTOUIC enabled
|
||||
add_executable(skipUicA ${skipUicSources})
|
||||
set_property(TARGET skipUicA PROPERTY AUTOUIC ON)
|
||||
target_link_libraries(skipUicA ${QT_LIBRARIES})
|
||||
# AUTOUIC and AUTOMOC enabled
|
||||
add_executable(skipUicB ${skipUicSources})
|
||||
set_property(TARGET skipUicB PROPERTY AUTOUIC ON)
|
||||
set_property(TARGET skipUicB PROPERTY AUTOMOC ON)
|
||||
target_link_libraries(skipUicB ${QT_LIBRARIES})
|
||||
|
||||
# -- Test: AUTOMOC AUTORCC
|
||||
# Source files with the same basename in different subdirectories
|
||||
add_subdirectory(sameName)
|
||||
|
||||
7
Tests/QtAutogen/skipSource/skipUicGen.cpp
Normal file
7
Tests/QtAutogen/skipSource/skipUicGen.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
#include "skipUicGen.hpp"
|
||||
#include "ui_uigen2.h"
|
||||
|
||||
void skipGen()
|
||||
{
|
||||
}
|
||||
8
Tests/QtAutogen/skipSource/skipUicGen.hpp
Normal file
8
Tests/QtAutogen/skipSource/skipUicGen.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef SKIPUICGEN_HPP
|
||||
#define SKIPUICGEN_HPP
|
||||
|
||||
#include "ui_uigen1.h"
|
||||
|
||||
void skipGen();
|
||||
|
||||
#endif
|
||||
7
Tests/QtAutogen/skipSource/skipUicNoGen1.cpp
Normal file
7
Tests/QtAutogen/skipSource/skipUicNoGen1.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
#include "skipUicNoGen1.hpp"
|
||||
#include "ui_nogen2.h"
|
||||
|
||||
void skipNoGen1()
|
||||
{
|
||||
}
|
||||
8
Tests/QtAutogen/skipSource/skipUicNoGen1.hpp
Normal file
8
Tests/QtAutogen/skipSource/skipUicNoGen1.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef SKIPUICNOGEN1_H
|
||||
#define SKIPUICNOGEN1_H
|
||||
|
||||
#include "ui_nogen1.h"
|
||||
|
||||
void skipNoGen1();
|
||||
|
||||
#endif
|
||||
7
Tests/QtAutogen/skipSource/skipUicNoGen2.cpp
Normal file
7
Tests/QtAutogen/skipSource/skipUicNoGen2.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
#include "skipUicNoGen2.hpp"
|
||||
#include "ui_nogen2.h"
|
||||
|
||||
void skipNoGen2()
|
||||
{
|
||||
}
|
||||
8
Tests/QtAutogen/skipSource/skipUicNoGen2.hpp
Normal file
8
Tests/QtAutogen/skipSource/skipUicNoGen2.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef SKIPUICNOGEN2_H
|
||||
#define SKIPUICNOGEN2_H
|
||||
|
||||
#include "ui_nogen1.h"
|
||||
|
||||
void skipNoGen2();
|
||||
|
||||
#endif
|
||||
6
Tests/QtAutogen/skipSource/ui_nogen1.h
Normal file
6
Tests/QtAutogen/skipSource/ui_nogen1.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef UI_NOGEN1_H
|
||||
#define UI_NOGEN1_H
|
||||
|
||||
void ui_nogen1();
|
||||
|
||||
#endif
|
||||
6
Tests/QtAutogen/skipSource/ui_nogen2.h
Normal file
6
Tests/QtAutogen/skipSource/ui_nogen2.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef UI_NOGEN2_H
|
||||
#define UI_NOGEN2_H
|
||||
|
||||
void ui_nogen2();
|
||||
|
||||
#endif
|
||||
24
Tests/QtAutogen/skipSource/uigen1.ui
Normal file
24
Tests/QtAutogen/skipSource/uigen1.ui
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UiGen1</class>
|
||||
<widget class="QWidget" name="UiGen1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="treeView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
24
Tests/QtAutogen/skipSource/uigen2.ui
Normal file
24
Tests/QtAutogen/skipSource/uigen2.ui
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UiGen2</class>
|
||||
<widget class="QWidget" name="UiGen2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTreeView" name="treeView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
22
Tests/QtAutogen/skipUic.cpp
Normal file
22
Tests/QtAutogen/skipUic.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#include "skipSource/skipUicGen.hpp"
|
||||
#include "skipSource/skipUicNoGen1.hpp"
|
||||
#include "skipSource/skipUicNoGen2.hpp"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
skipGen();
|
||||
skipNoGen1();
|
||||
skipNoGen2();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -- Function definitions
|
||||
void ui_nogen1()
|
||||
{
|
||||
}
|
||||
|
||||
void ui_nogen2()
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user