[cmake-commits] andy committed CMakeLists.txt 1.340 1.341
cmLocalGenerator.cxx 1.180 1.181 cmLocalGenerator.h 1.71 1.72
cmMakefile.cxx 1.372 1.373 cmTarget.cxx 1.123 1.124 cmTarget.h
1.72 1.73
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Feb 23 09:46:29 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9630/Source
Modified Files:
CMakeLists.txt cmLocalGenerator.cxx cmLocalGenerator.h
cmMakefile.cxx cmTarget.cxx cmTarget.h
Log Message:
ENH: Make EXCLUDE_FROM_ALL a target and directory properties. Also, make IsInAll use EXCLUDE_FROM_ALL. Also, enable the test that tests this
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- cmLocalGenerator.cxx 22 Feb 2007 22:34:14 -0000 1.180
+++ cmLocalGenerator.cxx 23 Feb 2007 14:46:27 -0000 1.181
@@ -36,7 +36,6 @@
{
this->Makefile = new cmMakefile;
this->Makefile->SetLocalGenerator(this);
- this->ExcludeFromAll = false;
this->Parent = 0;
this->WindowsShell = false;
this->WindowsVSIDE = false;
@@ -2407,3 +2406,13 @@
{
return sf.GetSourceName();
}
+
+bool cmLocalGenerator::GetExcludeAll()
+{
+ return this->Makefile->GetPropertyAsBool("EXCLUDE_FROM_ALL");
+}
+
+void cmLocalGenerator::SetExcludeAll(bool b)
+{
+ this->Makefile->SetProperty("EXCLUDE_FROM_ALL", b?"TRUE":"FALSE");
+}
Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- cmLocalGenerator.h 16 Feb 2007 21:12:16 -0000 1.71
+++ cmLocalGenerator.h 23 Feb 2007 14:46:27 -0000 1.72
@@ -114,14 +114,8 @@
std::string ConvertToOptionallyRelativeOutputPath(const char* remote);
// flag to determine if this project should be included in a parent project
- bool GetExcludeAll()
- {
- return this->ExcludeFromAll;
- }
- void SetExcludeAll(bool b)
- {
- this->ExcludeFromAll = b;
- }
+ bool GetExcludeAll();
+ void SetExcludeAll(bool b);
///! set/get the parent generator
cmLocalGenerator* GetParent(){return this->Parent;}
@@ -281,7 +275,6 @@
std::vector<std::string> StartDirectoryComponents;
std::vector<std::string> HomeOutputDirectoryComponents;
std::vector<std::string> StartOutputDirectoryComponents;
- bool ExcludeFromAll;
cmLocalGenerator* Parent;
std::vector<cmLocalGenerator*> Children;
std::map<cmStdString, cmStdString> LanguageToIncludeFlags;
Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- cmTarget.h 19 Feb 2007 19:32:36 -0000 1.72
+++ cmTarget.h 23 Feb 2007 14:46:27 -0000 1.73
@@ -60,10 +60,10 @@
/**
* Indicate whether the target is part of the all target
*/
- bool IsInAll() { return this->GetPropertyAsBool("IN_ALL"); }
- bool GetInAll() { return this->GetPropertyAsBool("IN_ALL"); }
+ bool IsInAll() { return !this->GetPropertyAsBool("EXCLUDE_FROM_ALL"); }
+ bool GetInAll() { return !this->GetPropertyAsBool("EXCLUDE_FROM_ALL"); }
void SetInAll(bool f) {
- this->SetProperty("IN_ALL", (f) ?"TRUE" : "FALSE"); }
+ this->SetProperty("EXCLUDE_FROM_ALL", (f) ?"FALSE" : "TRUE"); }
///! Set the cmMakefile that owns this target
void SetMakefile(cmMakefile *mf);
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -d -r1.340 -r1.341
--- CMakeLists.txt 22 Feb 2007 15:31:12 -0000 1.340
+++ CMakeLists.txt 23 Feb 2007 14:46:27 -0000 1.341
@@ -545,6 +545,19 @@
--build-two-config
--test-command simple)
+ ADD_TEST(SimpleExclude ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/SimpleExclude"
+ "${CMake_BINARY_DIR}/Tests/SimpleExclude"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project SimpleExclude
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-two-config
+ --test-command "${CMAKE_COMMAND}"
+ "-DCONFIGURATION=\${CTEST_CONFIGURATION_TYPE}"
+ -P "${CMAKE_BINARY_DIR}/Tests/SimpleExclude/run.cmake"
+ )
+
# ADD_TEST(SameName ${CMAKE_CTEST_COMMAND}
# --build-and-test
# "${CMake_SOURCE_DIR}/Tests/SameName"
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- cmTarget.cxx 19 Feb 2007 19:32:36 -0000 1.123
+++ cmTarget.cxx 23 Feb 2007 14:46:27 -0000 1.124
@@ -117,10 +117,10 @@
"(such as \".lib\") on an import library name.");
cm->DefineProperty
- ("IN_ALL", cmProperty::TARGET,
- "Is this target part of the all target.",
- "A property on a target that indicates if the target is included as "
- "part of the default build target. If it is, then with a Makefile "
+ ("EXCLUDE_FROM_ALL", cmProperty::TARGET,
+ "Exclude the target from the all target.",
+ "A property on a target that indicates if the target is excluded "
+ "from the default build target. If it is not, then with a Makefile "
"for example typing make will couse this target to be built as well. "
"The same concept applies to the default build of other generators.");
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.372
retrieving revision 1.373
diff -u -d -r1.372 -r1.373
--- cmMakefile.cxx 9 Feb 2007 18:44:37 -0000 1.372
+++ cmMakefile.cxx 23 Feb 2007 14:46:27 -0000 1.373
@@ -2745,4 +2745,12 @@
"A cmake file that will be included when ctest is run.",
"If you specify TEST_INCLUDE_FILE, that file will be "
"included and processed when ctest is run on the directory.");
+
+ cm->DefineProperty
+ ("EXCLUDE_FROM_ALL", cmProperty::DIRECTORY,
+ "Exclude the target from the all target.",
+ "A property on a target that indicates if the target is excluded "
+ "from the default build target. If it is not, then with a Makefile "
+ "for example typing make will couse this target to be built as well. "
+ "The same concept applies to the default build of other generators.");
}
More information about the Cmake-commits
mailing list