diff options
author | Brad King <brad.king@kitware.com> | 2015-01-12 13:57:52 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-12 13:57:52 (GMT) |
commit | b4f62b875b135f94ccc587f1937db3347fd62198 (patch) | |
tree | 2e9c1ca261a6bcde36e030d8875004a2f376d375 | |
parent | af0ee419553c501cb81f6210b9b1f724844c3dcd (diff) | |
parent | 9a673737163a3474c83c8100c57454318344ef1c (diff) | |
download | CMake-b4f62b875b135f94ccc587f1937db3347fd62198.zip CMake-b4f62b875b135f94ccc587f1937db3347fd62198.tar.gz CMake-b4f62b875b135f94ccc587f1937db3347fd62198.tar.bz2 |
Merge topic 'fix-autouic-regression'
9a673737 QtAutoUic: Add a test for the regression in the parent commit.
7c585699 QtAutoUic: Restore source file AUTOUIC_OPTIONS settings
-rw-r--r-- | Source/cmSourceFile.cxx | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/calwidget.cpp | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 27fda40..6847475 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -24,7 +24,7 @@ cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name): this->CustomCommand = 0; this->Properties.SetCMakeInstance(mf->GetCMakeInstance()); this->FindFullPathFailed = false; - this->IsUiFile = ("ui" == + this->IsUiFile = (".ui" == cmSystemTools::GetFilenameLastExtension(this->Location.GetName())); } diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index a60b556..0dc98e3 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) |