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  91e3176521915a83fa1bbe3efbd03042a906bcc2 (commit)
       via  a0fbdb8b2c928306848dd19de0ceaf5a90c741a7 (commit)
      from  8007742a3a19ff7d9fded4ee7a8aeec8201dce1f (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91e3176521915a83fa1bbe3efbd03042a906bcc2
commit 91e3176521915a83fa1bbe3efbd03042a906bcc2
Merge: 8007742 a0fbdb8
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Tue Aug 23 15:12:21 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Aug 23 15:12:21 2016 -0400

    Merge topic '16101-xcode-fix-directory-exclude-from-all' into next
    
    a0fbdb8b Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0fbdb8b2c928306848dd19de0ceaf5a90c741a7
commit a0fbdb8b2c928306848dd19de0ceaf5a90c741a7
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Fri Aug 19 21:50:48 2016 +0200
Commit:     Gregor Jasny <gja...@googlemail.com>
CommitDate: Sat Aug 20 22:27:09 2016 +0200

    Xcode: Add targets marked as EXCLUDE_FROM_ALL to project (#16101)

diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index 780ca90..7b7c744 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2639,9 +2639,6 @@ bool cmGlobalXCodeGenerator::CreateGroups(
 {
   for (std::vector<cmLocalGenerator*>::iterator i = generators.begin();
        i != generators.end(); ++i) {
-    if (this->IsExcluded(root, *i)) {
-      continue;
-    }
     cmMakefile* mf = (*i)->GetMakefile();
     std::vector<cmSourceGroup> sourceGroups = mf->GetSourceGroups();
     std::vector<cmGeneratorTarget*> tgts = (*i)->GetGeneratorTargets();
@@ -3041,10 +3038,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
   std::vector<cmXCodeObject*> targets;
   for (std::vector<cmLocalGenerator*>::iterator i = generators.begin();
        i != generators.end(); ++i) {
-    if (!this->IsExcluded(root, *i)) {
-      if (!this->CreateXCodeTargets(*i, targets)) {
-        return false;
-      }
+    if (!this->CreateXCodeTargets(*i, targets)) {
+      return false;
     }
   }
   // loop over all targets and add link and depend info
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake 
b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake
new file mode 100644
index 0000000..f686005
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake
@@ -0,0 +1,6 @@
+enable_language(CXX)
+
+add_subdirectory(ExcludeFromAll EXCLUDE_FROM_ALL)
+
+add_executable(main main.cpp)
+target_link_libraries(main PRIVATE foo)
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt 
b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt
new file mode 100644
index 0000000..b1df6b0
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_library(bar STATIC bar.cpp)
+
+add_library(foo STATIC foo.cpp)
+target_include_directories(foo PUBLIC .)
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp 
b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp
new file mode 100644
index 0000000..7a828bd
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp
@@ -0,0 +1 @@
+#error This should be excluded from all target
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp 
b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp
new file mode 100644
index 0000000..2789e61
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp
@@ -0,0 +1,3 @@
+#include "foo.h"
+
+int foo() { return 42; }
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.h 
b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.h
new file mode 100644
index 0000000..5d5f8f0
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.h
@@ -0,0 +1 @@
+int foo();
diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake 
b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
index 9d514e1..6d9418b 100644
--- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
@@ -3,3 +3,15 @@ include(RunCMake)
 run_cmake(DoesNotExist)
 run_cmake(Missing)
 run_cmake(Function)
+
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll)
+set(RunCMake_TEST_NO_CLEAN 1)
+
+file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+run_cmake(ExcludeFromAll)
+run_cmake_command(ExcludeFromAll-build ${CMAKE_COMMAND} --build .)
+
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/add_subdirectory/main.cpp 
b/Tests/RunCMake/add_subdirectory/main.cpp
new file mode 100644
index 0000000..1fbb144
--- /dev/null
+++ b/Tests/RunCMake/add_subdirectory/main.cpp
@@ -0,0 +1,6 @@
+#include "foo.h"
+
+int main(int argc, char* argv[])
+{
+    return foo();
+}

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx                          |    9 ++-------
 Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake       |    6 ++++++
 .../add_subdirectory/ExcludeFromAll/CMakeLists.txt         |    4 ++++
 Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp     |    1 +
 Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp     |    3 +++
 .../{Framework => add_subdirectory/ExcludeFromAll}/foo.h   |    0
 Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake         |   12 ++++++++++++
 .../Case5/main.c => RunCMake/add_subdirectory/main.cpp}    |    5 ++---
 8 files changed, 30 insertions(+), 10 deletions(-)
 create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake
 create mode 100644 
Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt
 create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll/bar.cpp
 create mode 100644 Tests/RunCMake/add_subdirectory/ExcludeFromAll/foo.cpp
 copy Tests/RunCMake/{Framework => add_subdirectory/ExcludeFromAll}/foo.h (100%)
 copy Tests/{Dependency/Case5/main.c => RunCMake/add_subdirectory/main.cpp} 
(50%)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to