[Cmake-commits] CMake branch, next, updated. v2.8.9-1111-gb6ffadb

Brad King brad.king at kitware.com
Tue Oct 16 11:19:44 EDT 2012


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  b6ffadb60ab574d68112d8944769871997762c2c (commit)
       via  69e305f279cf77e4255c13c36e5cb1bd697e3617 (commit)
      from  d4de6c1ddfd1c7daf51a33a58720c7926b60baf2 (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=b6ffadb60ab574d68112d8944769871997762c2c
commit b6ffadb60ab574d68112d8944769871997762c2c
Merge: d4de6c1 69e305f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 16 11:19:42 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 16 11:19:42 2012 -0400

    Merge topic 'vs-exclude-per-config' into next
    
    69e305f Revert topic 'vs-exclude-per-config'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69e305f279cf77e4255c13c36e5cb1bd697e3617
commit 69e305f279cf77e4255c13c36e5cb1bd697e3617
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 16 11:16:40 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 16 11:19:13 2012 -0400

    Revert topic 'vs-exclude-per-config'
    
    Revert commits
    
     cb13d34 Define property EXCLUDE_FROM_DEFAULT_BUILD
     9d94586 Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>
     05630f5 Add tests for EXCLUDE_FROM_DEFAULT_BUILD
    
    because the test fails for VS >= 10 when using MSBuild instead of
    devenv, for example with VS Express editions.

diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 736efd5..ab2308f 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -273,10 +273,9 @@ void cmGlobalVisualStudio71Generator
 // Write a dsp file into the SLN file, Note, that dependencies from
 // executables to the libraries it uses are also done here
 void cmGlobalVisualStudio71Generator
-::WriteProjectConfigurations(
-  std::ostream& fout, const char* name,
-  const std::set<std::string>& configsPartOfDefaultBuild,
-  const char* platformMapping)
+::WriteProjectConfigurations(std::ostream& fout, const char* name,
+                             bool partOfDefaultBuild,
+                             const char* platformMapping)
 {
   std::string guid = this->GetGUID(name);
   for(std::vector<std::string>::iterator i = this->Configurations.begin();
@@ -285,9 +284,7 @@ void cmGlobalVisualStudio71Generator
     fout << "\t\t{" << guid << "}." << *i
          << ".ActiveCfg = " << *i << "|"
          << (platformMapping ? platformMapping : "Win32") << std::endl;
-    std::set<std::string>::const_iterator
-      ci = configsPartOfDefaultBuild.find(*i);
-    if(!(ci == configsPartOfDefaultBuild.end()))
+    if(partOfDefaultBuild)
       {
       fout << "\t\t{" << guid << "}." << *i
            << ".Build.0 = " << *i << "|"
diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h
index 5dd194c..a8daad6 100644
--- a/Source/cmGlobalVisualStudio71Generator.h
+++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -61,10 +61,10 @@ protected:
                             const char* name, const char* path, cmTarget &t);
   virtual void WriteProjectDepends(std::ostream& fout,
                            const char* name, const char* path, cmTarget &t);
-  virtual void WriteProjectConfigurations(
-    std::ostream& fout, const char* name,
-    const std::set<std::string>& configsPartOfDefaultBuild,
-    const char* platformMapping = NULL);
+  virtual void WriteProjectConfigurations(std::ostream& fout,
+                                          const char* name,
+                                          bool partOfDefaultBuild,
+                                          const char* platformMapping = NULL);
   virtual void WriteExternalProject(std::ostream& fout,
                                     const char* name,
                                     const char* path,
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 8c2e470..b6eea5d 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -10,7 +10,6 @@
   See the License for more information.
 ============================================================================*/
 #include "windows.h" // this must be first to define GetCurrentDirectory
-#include <assert.h>
 #include "cmGlobalVisualStudio7Generator.h"
 #include "cmGeneratedFileStream.h"
 #include "cmLocalVisualStudio7Generator.h"
@@ -244,23 +243,20 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
     const char* expath = target->GetProperty("EXTERNAL_MSPROJECT");
     if(expath)
       {
-      std::set<std::string> allConfigurations(this->Configurations.begin(),
-                                              this->Configurations.end());
       this->WriteProjectConfigurations(
         fout, target->GetName(),
-        allConfigurations, target->GetProperty("VS_PLATFORM_MAPPING"));
+        true, target->GetProperty("VS_PLATFORM_MAPPING"));
       }
     else
       {
-      const std::set<std::string>& configsPartOfDefaultBuild =
-        this->IsPartOfDefaultBuild(root->GetMakefile()->GetProjectName(),
-                                   target);
+      bool partOfDefaultBuild = this->IsPartOfDefaultBuild(
+        root->GetMakefile()->GetProjectName(), target);
       const char *vcprojName =
         target->GetProperty("GENERATOR_FILE_NAME");
       if (vcprojName)
         {
         this->WriteProjectConfigurations(fout, vcprojName,
-                                         configsPartOfDefaultBuild);
+                                         partOfDefaultBuild);
         }
       }
     }
@@ -581,10 +577,9 @@ cmGlobalVisualStudio7Generator
 // Write a dsp file into the SLN file, Note, that dependencies from
 // executables to the libraries it uses are also done here
 void cmGlobalVisualStudio7Generator
-::WriteProjectConfigurations(
-  std::ostream& fout, const char* name,
-  const std::set<std::string>& configsPartOfDefaultBuild,
-  const char* platformMapping)
+::WriteProjectConfigurations(std::ostream& fout, const char* name,
+                             bool partOfDefaultBuild,
+                             const char* platformMapping)
 {
   std::string guid = this->GetGUID(name);
   for(std::vector<std::string>::iterator i = this->Configurations.begin();
@@ -593,9 +588,7 @@ void cmGlobalVisualStudio7Generator
     fout << "\t\t{" << guid << "}." << *i
          << ".ActiveCfg = " << *i << "|"
          << (platformMapping ? platformMapping : "Win32") << "\n";
-    std::set<std::string>::const_iterator
-      ci = configsPartOfDefaultBuild.find(*i);
-    if(!(ci == configsPartOfDefaultBuild.end()))
+    if(partOfDefaultBuild)
       {
       fout << "\t\t{" << guid << "}." << *i
            << ".Build.0 = " << *i << "|"
@@ -768,34 +761,26 @@ cmGlobalVisualStudio7Generator
     }
 }
 
-std::set<std::string>
-cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
-                                                     cmTarget* target)
+bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
+                                                          cmTarget* target)
 {
-  std::set<std::string> activeConfigs;
+  if(target->GetPropertyAsBool("EXCLUDE_FROM_DEFAULT_BUILD"))
+    {
+    return false;
+    }
   // if it is a utilitiy target then only make it part of the
   // default build if another target depends on it
   int type = target->GetType();
   if (type == cmTarget::GLOBAL_TARGET)
     {
-    return activeConfigs;
-    }
-  if(type == cmTarget::UTILITY && !this->IsDependedOn(project, target))
-    {
-    return activeConfigs;
+    return false;
     }
-  // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties
-  for(std::vector<std::string>::iterator i = this->Configurations.begin();
-      i != this->Configurations.end(); ++i)
+  if(type == cmTarget::UTILITY)
     {
-    const char* propertyValue =
-      target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i->c_str());
-    if(cmSystemTools::IsOff(propertyValue))
-      {
-      activeConfigs.insert(*i);
-      }
+    return this->IsDependedOn(project, target);
     }
-  return activeConfigs;
+  // default is to be part of the build
+  return true;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 3775dd4..1df58f9 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -105,10 +105,10 @@ protected:
                             const char* name, const char* path, cmTarget &t);
   virtual void WriteProjectDepends(std::ostream& fout,
                            const char* name, const char* path, cmTarget &t);
-  virtual void WriteProjectConfigurations(
-    std::ostream& fout, const char* name,
-    const std::set<std::string>& configsPartOfDefaultBuild,
-    const char* platformMapping = NULL);
+  virtual void WriteProjectConfigurations(std::ostream& fout,
+                                          const char* name,
+                                          bool partOfDefaultBuild,
+                                          const char* platformMapping = NULL);
   virtual void WriteSLNFooter(std::ostream& fout);
   virtual void WriteSLNHeader(std::ostream& fout);
   virtual std::string WriteUtilityDepend(cmTarget* target);
@@ -136,8 +136,8 @@ protected:
 
   std::string ConvertToSolutionPath(const char* path);
 
-  std::set<std::string> IsPartOfDefaultBuild(const char* project,
-                                             cmTarget* target);
+  bool IsPartOfDefaultBuild(const char* project,
+                            cmTarget* target);
   std::vector<std::string> Configurations;
   std::map<cmStdString, cmStdString> GUIDMap;
 
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index bd09462..bca1754 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -258,10 +258,9 @@ cmGlobalVisualStudio8Generator
 //----------------------------------------------------------------------------
 void
 cmGlobalVisualStudio8Generator
-::WriteProjectConfigurations(
-  std::ostream& fout, const char* name,
-  const std::set<std::string>& configsPartOfDefaultBuild,
-  const char* platformMapping)
+::WriteProjectConfigurations(std::ostream& fout, const char* name,
+                             bool partOfDefaultBuild,
+                             const char* platformMapping)
 {
   std::string guid = this->GetGUID(name);
   for(std::vector<std::string>::iterator i = this->Configurations.begin();
@@ -271,9 +270,7 @@ cmGlobalVisualStudio8Generator
          << "|" << this->GetPlatformName() << ".ActiveCfg = " << *i << "|"
          << (platformMapping ? platformMapping : this->GetPlatformName())
          << "\n";
-    std::set<std::string>::const_iterator
-      ci = configsPartOfDefaultBuild.find(*i);
-    if(!(ci == configsPartOfDefaultBuild.end()))
+    if(partOfDefaultBuild)
       {
       fout << "\t\t{" << guid << "}." << *i
            << "|" << this->GetPlatformName() << ".Build.0 = " << *i << "|"
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index 2c9424d..5009f29 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -74,10 +74,10 @@ protected:
   static cmIDEFlagTable const* GetExtraFlagTableVS8();
   virtual void WriteSLNHeader(std::ostream& fout);
   virtual void WriteSolutionConfigurations(std::ostream& fout);
-  virtual void WriteProjectConfigurations(
-    std::ostream& fout, const char* name,
-    const std::set<std::string>& configsPartOfDefaultBuild,
-    const char* platformMapping = NULL);
+  virtual void WriteProjectConfigurations(std::ostream& fout,
+                                          const char* name,
+                                          bool partOfDefaultBuild,
+                                          const char* platformMapping = NULL);
   virtual bool ComputeTargetDepends();
   virtual void WriteProjectDepends(std::ostream& fout, const char* name,
                                    const char* path, cmTarget &t);
diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h
index 9dd7848..65c89fa 100644
--- a/Source/cmSetTargetPropertiesCommand.h
+++ b/Source/cmSetTargetPropertiesCommand.h
@@ -156,9 +156,7 @@ public:
         "\n"
         "The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual "
         "studio generators.  If it is set to 1 the target will not be "
-        "part of the default build when you select \"Build Solution\". "
-        "This can also be set on a per-configuration basis using "
-        "EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>."
+        "part of the default build when you select \"Build Solution\"."
         ;
     }
 
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0b1f034..423b350 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -266,21 +266,6 @@ void cmTarget::DefineProperties(cmake *cm)
      "bundle.");
 
   cm->DefineProperty
-    ("EXCLUDE_FROM_DEFAULT_BUILD", cmProperty::TARGET,
-     "Exclude target from \"Build Solution\".",
-     "This property is only used by Visual Studio generators 7 and above. "
-     "When set to TRUE, the target will not be built when you press "
-     "\"Build Solution\".");
-
-  cm->DefineProperty
-    ("EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>", cmProperty::TARGET,
-     "Per-configuration version of target exclusion from \"Build Solution\". ",
-     "This is the configuration-specific version of "
-     "EXCLUDE_FROM_DEFAULT_BUILD. If the generic EXCLUDE_FROM_DEFAULT_BUILD "
-     "is also set on a target, EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG> takes "
-     "precedence in configurations for which it has a value.");
-
-  cm->DefineProperty
     ("FRAMEWORK", cmProperty::TARGET,
      "This target is a framework on the Mac.",
      "If a shared library target has this property set to true it will "
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1476e16..ae69ce8 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1409,23 +1409,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
       --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
       --test-command VSMidl)
     list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSMidl")
-
-    if(NOT MSVC60)
-      configure_file("${CMake_SOURCE_DIR}/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake.in"
-                     "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake" @ONLY)
-      foreach(config ${CMAKE_CONFIGURATION_TYPES})
-        add_test(VSExcludeFromDefaultBuild-${config} ${CMAKE_CTEST_COMMAND}
-          --build-and-test
-          "${CMake_SOURCE_DIR}/Tests/VSExcludeFromDefaultBuild"
-          "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild"
-          --build-config ${config}
-          --build-two-config
-          --build-generator ${CMAKE_TEST_GENERATOR}
-          --build-project VSExcludeFromDefaultBuild
-          --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
-          --test-command ${CMAKE_COMMAND} -P "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake" ${config})
-      endforeach()
-    endif()
   endif()
 
   if (APPLE)
diff --git a/Tests/VSExcludeFromDefaultBuild/CMakeLists.txt b/Tests/VSExcludeFromDefaultBuild/CMakeLists.txt
deleted file mode 100644
index 6db5ae1..0000000
--- a/Tests/VSExcludeFromDefaultBuild/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-cmake_minimum_required(VERSION 2.6)
-project(VSExcludeFromDefaultBuild)
-
-add_executable(DefaultBuilt main.c)
-
-add_executable(AlwaysBuilt main.c)
-set_target_properties(AlwaysBuilt PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
-
-add_executable(NeverBuilt main.c)
-set_target_properties(NeverBuilt PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
-
-foreach(config ${CMAKE_CONFIGURATION_TYPES})
-  string(TOUPPER ${config} Config)
-  add_executable(BuiltIn${config} main.c)
-  set_target_properties(BuiltIn${config} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE EXCLUDE_FROM_DEFAULT_BUILD_${Config} FALSE)
-  add_executable(ExcludedIn${config} main.c)
-  set_target_properties(ExcludedIn${config} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD_${Config} TRUE)
-endforeach()
diff --git a/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake.in b/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake.in
deleted file mode 100644
index acec32a..0000000
--- a/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake.in
+++ /dev/null
@@ -1,26 +0,0 @@
-set(activeConfig ${CMAKE_ARGV3})
-set(allConfigs @CMAKE_CONFIGURATION_TYPES@)
-
-message(STATUS "Testing configuration ${activeConfig}.")
-
-macro(TestExists exeName)
-  set(exeFile "${CMAKE_CURRENT_LIST_DIR}/${activeConfig}/${exeName}.exe")
-  if(${ARGN} EXISTS "${exeFile}")
-    message(STATUS "File ${exeFile} was correctly found ${ARGN} to exist.")
-  else()
-    message(FATAL_ERROR "File ${exeFile} was expected ${ARGN} to exist!")
-  endif()
-endmacro()
-
-TestExists(DefaultBuilt)
-TestExists(AlwaysBuilt)
-TestExists(NeverBuilt NOT)
-foreach(config ${allConfigs})
-  if(config STREQUAL activeConfig)
-    TestExists(BuiltIn${config})
-    TestExists(ExcludedIn${config} NOT)
-  else()
-    TestExists(BuiltIn${config} NOT)
-    TestExists(ExcludedIn${config})
-  endif()
-endforeach()
diff --git a/Tests/VSExcludeFromDefaultBuild/main.c b/Tests/VSExcludeFromDefaultBuild/main.c
deleted file mode 100644
index 8488f4e..0000000
--- a/Tests/VSExcludeFromDefaultBuild/main.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(void)
-{
-  return 0;
-}

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalVisualStudio71Generator.cxx         |   11 ++---
 Source/cmGlobalVisualStudio71Generator.h           |    8 ++--
 Source/cmGlobalVisualStudio7Generator.cxx          |   53 +++++++-------------
 Source/cmGlobalVisualStudio7Generator.h            |   12 ++--
 Source/cmGlobalVisualStudio8Generator.cxx          |   11 ++---
 Source/cmGlobalVisualStudio8Generator.h            |    8 ++--
 Source/cmSetTargetPropertiesCommand.h              |    4 +-
 Source/cmTarget.cxx                                |   15 ------
 Tests/CMakeLists.txt                               |   17 ------
 Tests/VSExcludeFromDefaultBuild/CMakeLists.txt     |   18 -------
 .../VSExcludeFromDefaultBuild/ResultTest.cmake.in  |   26 ----------
 Tests/VSExcludeFromDefaultBuild/main.c             |    4 --
 12 files changed, 42 insertions(+), 145 deletions(-)
 delete mode 100644 Tests/VSExcludeFromDefaultBuild/CMakeLists.txt
 delete mode 100644 Tests/VSExcludeFromDefaultBuild/ResultTest.cmake.in
 delete mode 100644 Tests/VSExcludeFromDefaultBuild/main.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list