summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-12 00:22:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-12 00:41:27 (GMT)
commit9a673737163a3474c83c8100c57454318344ef1c (patch)
tree1cc97587c88086ca78c74eef8ce4b65b81f22296 /Tests/QtAutogen
parent7c585699304ac071cdf7c1b8d7677d38b859e70f (diff)
downloadCMake-9a673737163a3474c83c8100c57454318344ef1c.zip
CMake-9a673737163a3474c83c8100c57454318344ef1c.tar.gz
CMake-9a673737163a3474c83c8100c57454318344ef1c.tar.bz2
QtAutoUic: Add a test for the regression in the parent commit.
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/calwidget.cpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 3fd00b8..de4d0d2 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -73,6 +73,12 @@ if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]" AND NOT CMAKE_CONFIGURATION_
add_definitions(-DTEST_DEBUG_CLASS)
endif()
+# The -no-protection option disables the generation of include guards. Verify
+# that setting the source file property has an effect by using this and
+# issue an error in the preprocessor in calwidget.cpp if the include guard
+# is defined.
+set_source_files_properties(calwidget.ui PROPERTIES AUTOUIC_OPTIONS "-no-protection")
+
add_executable(QtAutogen main.cpp calwidget.cpp second_widget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
multiplewidgets.cpp
xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>
diff --git a/Tests/QtAutogen/calwidget.cpp b/Tests/QtAutogen/calwidget.cpp
index defde20..5f59994 100644
--- a/Tests/QtAutogen/calwidget.cpp
+++ b/Tests/QtAutogen/calwidget.cpp
@@ -50,6 +50,9 @@
#include "calwidget.h"
#include "ui_calwidget.h"
+ #ifdef UI_CALWIDGET_H
+ #error Definition of UI_CALWIDGET_H should be disabled by file option.
+ #endif
Window::Window()
: ui(new Ui::Window)