[Cmake-commits] CMake branch, next, updated. v2.8.11.1-2822-g361ff41
Alexander Neundorf
neundorf at kde.org
Fri Jun 28 15:39:55 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 361ff4145528a73d51be1bd1ea450f5a2b8accfb (commit)
via ba0e06f250665ee985bb6e94dbee3ca8009b60a7 (commit)
from 754b1a473704e04055cb9601d61cc7eaf21cdb78 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=361ff4145528a73d51be1bd1ea450f5a2b8accfb
commit 361ff4145528a73d51be1bd1ea450f5a2b8accfb
Merge: 754b1a4 ba0e06f
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Fri Jun 28 15:39:51 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jun 28 15:39:51 2013 -0400
Merge topic 'AddAutomocTargetFolder' into next
ba0e06f automoc: add a global AUTOMOC_TARGETS_FOLDER property
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba0e06f250665ee985bb6e94dbee3ca8009b60a7
commit ba0e06f250665ee985bb6e94dbee3ca8009b60a7
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Jun 28 21:40:16 2013 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Fri Jun 28 21:40:16 2013 +0200
automoc: add a global AUTOMOC_TARGETS_FOLDER property
This has been requested, along with a patch, by Shaun Williams
in http://public.kitware.com/Bug/view.php?id=13788 .
It adds a global property AUTOMOC_TARGETS_FOLDER, which can
be used to group the automoc targets together in a folder e.g.
in Visual Studio.
Alex
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 05c43c4..34b3c7e 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -255,8 +255,18 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
automocTargetName.c_str(), true,
workingDirectory.c_str(), depends,
commandLines, false, automocComment.c_str());
- // inherit FOLDER property from target (#13688)
- copyTargetProperty(automocTarget, target, "FOLDER");
+ // Set target folder
+ const char* automocFolder = makefile->GetCMakeInstance()->GetProperty(
+ "AUTOMOC_TARGETS_FOLDER");
+ if (automocFolder && *automocFolder)
+ {
+ automocTarget->SetProperty("FOLDER", automocFolder);
+ }
+ else
+ {
+ // inherit FOLDER property from target (#13688)
+ copyTargetProperty(automocTarget, target, "FOLDER");
+ }
target->AddUtility(automocTargetName.c_str());
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b14db43..a90fa74 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -236,7 +236,9 @@ void cmTarget::DefineProperties(cmake *cm)
"AUTOMOC_MOC_OPTIONS property.\n"
"By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules "
"for searching the files which will be processed by moc can be relaxed. "
- "See the documentation for this variable for more details.");
+ "See the documentation for this variable for more details.\n"
+ "The global property AUTOMOC_TARGETS_FOLDER can be used to group the "
+ "automoc targets together in an IDE, e.g. in MSVS.");
cm->DefineProperty
("AUTOMOC_MOC_OPTIONS", cmProperty::TARGET,
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 29d9bb3..5f7d1e9 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3603,6 +3603,14 @@ void cmake::DefineProperties(cmake *cm)
"for the FOLDER target property.");
cm->DefineProperty
+ ("AUTOMOC_TARGETS_FOLDER", cmProperty::GLOBAL,
+ "Name of FOLDER for *_automoc targets that are added automatically by "
+ "CMake for targets for which AUTOMOC is enabled.",
+ "If not set, CMake uses the FOLDER property of the parent target as a "
+ "default value for this property. See also the documentation for the "
+ "FOLDER target property and the AUTOMOC target property.");
+
+ cm->DefineProperty
("PREDEFINED_TARGETS_FOLDER", cmProperty::GLOBAL,
"Name of FOLDER for targets that are added automatically by CMake.",
"If not set, CMake uses \"CMakePredefinedTargets\" as a default "
-----------------------------------------------------------------------
Summary of changes:
Source/cmQtAutomoc.cxx | 14 ++++++++++++--
Source/cmTarget.cxx | 4 +++-
Source/cmake.cxx | 8 ++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list