[Cmake-commits] CMake branch, next, updated. v3.3.1-2739-g15f0d58

Brad King brad.king at kitware.com
Wed Sep 2 16:46:31 EDT 2015


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  15f0d580d295ecb663147529f5880d95bc8764c8 (commit)
       via  43e4275aebc0effbb5527cc529b45193a2409f97 (commit)
       via  f2f717b4e0c74163552bbf7dd3e23e2ed0b3671f (commit)
       via  63eed714b4bbc542f15dc9466a5a15fd2c9811da (commit)
      from  3f4a27b904532e0e3bd3ff06cd7bbc039f8d4fa0 (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=15f0d580d295ecb663147529f5880d95bc8764c8
commit 15f0d580d295ecb663147529f5880d95bc8764c8
Merge: 3f4a27b 43e4275
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 2 16:46:28 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 2 16:46:28 2015 -0400

    Merge topic 'fix-buildsystem-target-properties' into next
    
    43e4275a Tests: Cover set_property for buildsystem target properties
    f2f717b4 cmTarget: Fix buildsystem property empty value set and append operations
    63eed714 Merge branch 'add-link-search-static-properties-defaults' into fix-buildsystem-target-properties


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43e4275aebc0effbb5527cc529b45193a2409f97
commit 43e4275aebc0effbb5527cc529b45193a2409f97
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 2 15:57:41 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 2 16:36:24 2015 -0400

    Tests: Cover set_property for buildsystem target properties
    
    Extend the RunCMake.set_property test with cases covering buildsystem
    target properties:
    
    * COMPILE_DEFINITIONS
    * COMPILE_FEATURES
    * COMPILE_OPTIONS
    * INCLUDE_DIRECTORIES
    * LINK_LIBRARIES
    * SOURCES
    
    Use the output generated by CMake 3.3 as the expected output for each
    test case.  Refactor the existing LINK_LIBRARIES case to the same
    more-extensive test as the rest.

diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
new file mode 100644
index 0000000..b85f41d
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
@@ -0,0 +1 @@
+-- Target COMPILE_DEFINITIONS is 'a;;b;c;;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
new file mode 100644
index 0000000..ec07ce9
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
@@ -0,0 +1,2 @@
+include(Common.cmake)
+test_target_property(COMPILE_DEFINITIONS)
diff --git a/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
new file mode 100644
index 0000000..81ef170
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
@@ -0,0 +1 @@
+-- Target COMPILE_FEATURES is 'a;;b;c;;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_FEATURES.cmake b/Tests/RunCMake/set_property/COMPILE_FEATURES.cmake
new file mode 100644
index 0000000..1ab52ef
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_FEATURES.cmake
@@ -0,0 +1,2 @@
+include(Common.cmake)
+test_target_property(COMPILE_FEATURES)
diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
new file mode 100644
index 0000000..f18451a
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
@@ -0,0 +1 @@
+-- Target COMPILE_OPTIONS is 'a;;b;c;;d;;e'
diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
new file mode 100644
index 0000000..da20ec8
--- /dev/null
+++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
@@ -0,0 +1,2 @@
+include(Common.cmake)
+test_target_property(COMPILE_OPTIONS)
diff --git a/Tests/RunCMake/set_property/Common.cmake b/Tests/RunCMake/set_property/Common.cmake
new file mode 100644
index 0000000..50e07f8
--- /dev/null
+++ b/Tests/RunCMake/set_property/Common.cmake
@@ -0,0 +1,13 @@
+macro(test_target_property PROP)
+  add_custom_target(CustomTarget)
+  set_property(TARGET CustomTarget PROPERTY ${PROP} x)
+  set_property(TARGET CustomTarget PROPERTY ${PROP})
+  set_property(TARGET CustomTarget APPEND PROPERTY ${PROP})
+  set_property(TARGET CustomTarget PROPERTY ${PROP} a)
+  set_property(TARGET CustomTarget APPEND PROPERTY ${PROP} "")
+  set_property(TARGET CustomTarget APPEND PROPERTY ${PROP} b c)
+  set_property(TARGET CustomTarget APPEND PROPERTY ${PROP})
+  set_property(TARGET CustomTarget APPEND PROPERTY ${PROP} "d;;e")
+  get_property(val TARGET CustomTarget PROPERTY ${PROP})
+  message(STATUS "Target ${PROP} is '${val}'")
+endmacro()
diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
new file mode 100644
index 0000000..f9970ce
--- /dev/null
+++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
@@ -0,0 +1 @@
+-- Target INCLUDE_DIRECTORIES is 'a;;b;c;;d;;e'
diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
new file mode 100644
index 0000000..8f44aee
--- /dev/null
+++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
@@ -0,0 +1,2 @@
+include(Common.cmake)
+test_target_property(INCLUDE_DIRECTORIES)
diff --git a/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
new file mode 100644
index 0000000..1f7663b
--- /dev/null
+++ b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
@@ -0,0 +1 @@
+-- Target LINK_LIBRARIES is 'a;;b;c;;d;;e'
diff --git a/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake b/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake
index 994e874..5155f59 100644
--- a/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake
+++ b/Tests/RunCMake/set_property/LINK_LIBRARIES.cmake
@@ -1,7 +1,2 @@
-add_custom_target(CustomTarget)
-set_property(TARGET CustomTarget PROPERTY LINK_LIBRARIES)
-set_property(TARGET CustomTarget APPEND PROPERTY LINK_LIBRARIES)
-get_property(val TARGET CustomTarget PROPERTY LINK_LIBRARIES)
-if (NOT "${val}" STREQUAL "")
-  message(FATAL_ERROR "LINK_LIBRARIES value is '${val}' but should be ''")
-endif()
+include(Common.cmake)
+test_target_property(LINK_LIBRARIES)
diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake
index 54e63f7..f38564c 100644
--- a/Tests/RunCMake/set_property/RunCMakeTest.cmake
+++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake
@@ -1,3 +1,8 @@
 include(RunCMake)
 
+run_cmake(COMPILE_DEFINITIONS)
+run_cmake(COMPILE_FEATURES)
+run_cmake(COMPILE_OPTIONS)
+run_cmake(INCLUDE_DIRECTORIES)
 run_cmake(LINK_LIBRARIES)
+run_cmake(SOURCES)
diff --git a/Tests/RunCMake/set_property/SOURCES-stdout.txt b/Tests/RunCMake/set_property/SOURCES-stdout.txt
new file mode 100644
index 0000000..921d5b1
--- /dev/null
+++ b/Tests/RunCMake/set_property/SOURCES-stdout.txt
@@ -0,0 +1 @@
+-- Target SOURCES is 'a;b;c;d;e'
diff --git a/Tests/RunCMake/set_property/SOURCES.cmake b/Tests/RunCMake/set_property/SOURCES.cmake
new file mode 100644
index 0000000..820641e
--- /dev/null
+++ b/Tests/RunCMake/set_property/SOURCES.cmake
@@ -0,0 +1,2 @@
+include(Common.cmake)
+test_target_property(SOURCES)
diff --git a/Tests/RunCMake/set_property/a b/Tests/RunCMake/set_property/a
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/set_property/b b/Tests/RunCMake/set_property/b
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/set_property/c b/Tests/RunCMake/set_property/c
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/set_property/d b/Tests/RunCMake/set_property/d
new file mode 100644
index 0000000..e69de29
diff --git a/Tests/RunCMake/set_property/e b/Tests/RunCMake/set_property/e
new file mode 100644
index 0000000..e69de29

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2f717b4e0c74163552bbf7dd3e23e2ed0b3671f
commit f2f717b4e0c74163552bbf7dd3e23e2ed0b3671f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 2 16:24:52 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 2 16:31:12 2015 -0400

    cmTarget: Fix buildsystem property empty value set and append operations
    
    Refactoring in commit 1f54bc1c (cmTarget: Split storage of include
    directories from genexes, 2015-08-04), commit 772ecef4 (cmTarget: Split
    storage of compile options from genexes, 2015-08-04), commit 44e071ae
    (cmTarget: Split storage of compile features from genexes, 2015-08-04),
    and commit 197f4de1 (cmTarget: Split storage of compile definitions from
    genexes, 2015-08-04) failed to account for value==NULL in SetProperty
    and AppendProperty methods.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 590654d..396715d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1601,33 +1601,45 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
     {
     this->Internal->IncludeDirectoriesEntries.clear();
     this->Internal->IncludeDirectoriesBacktraces.clear();
-    this->Internal->IncludeDirectoriesEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->IncludeDirectoriesEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_OPTIONS")
     {
     this->Internal->CompileOptionsEntries.clear();
     this->Internal->CompileOptionsBacktraces.clear();
-    this->Internal->CompileOptionsEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileOptionsBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileOptionsEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileOptionsBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_FEATURES")
     {
     this->Internal->CompileFeaturesEntries.clear();
     this->Internal->CompileFeaturesBacktraces.clear();
-    this->Internal->CompileFeaturesEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileFeaturesEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_DEFINITIONS")
     {
     this->Internal->CompileDefinitionsEntries.clear();
     this->Internal->CompileDefinitionsBacktraces.clear();
-    this->Internal->CompileDefinitionsEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileDefinitionsEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "EXPORT_NAME" && this->IsImported())
     {
@@ -1693,27 +1705,39 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
     }
   else if(prop == "INCLUDE_DIRECTORIES")
     {
-    this->Internal->IncludeDirectoriesEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->IncludeDirectoriesEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_OPTIONS")
     {
-    this->Internal->CompileOptionsEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileOptionsBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileOptionsEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileOptionsBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_FEATURES")
     {
-    this->Internal->CompileFeaturesEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileFeaturesEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileFeaturesBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "COMPILE_DEFINITIONS")
     {
-    this->Internal->CompileDefinitionsEntries.push_back(value);
-    cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
+    if (value)
+      {
+      this->Internal->CompileDefinitionsEntries.push_back(value);
+      cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
+      this->Internal->CompileDefinitionsBacktraces.push_back(lfbt);
+      }
     }
   else if(prop == "EXPORT_NAME" && this->IsImported())
     {

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63eed714b4bbc542f15dc9466a5a15fd2c9811da
commit 63eed714b4bbc542f15dc9466a5a15fd2c9811da
Merge: 72c11e5 18d7f8f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 2 16:31:03 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Sep 2 16:31:03 2015 -0400

    Merge branch 'add-link-search-static-properties-defaults' into fix-buildsystem-target-properties


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

Summary of changes:
 Source/cmTarget.cxx                                |   72 +++++++++++++-------
 .../set_property/COMPILE_DEFINITIONS-stdout.txt    |    1 +
 .../set_property/COMPILE_DEFINITIONS.cmake         |    2 +
 .../set_property/COMPILE_FEATURES-stdout.txt       |    1 +
 Tests/RunCMake/set_property/COMPILE_FEATURES.cmake |    2 +
 .../set_property/COMPILE_OPTIONS-stdout.txt        |    1 +
 Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake  |    2 +
 Tests/RunCMake/set_property/Common.cmake           |   13 ++++
 .../set_property/INCLUDE_DIRECTORIES-stdout.txt    |    1 +
 .../set_property/INCLUDE_DIRECTORIES.cmake         |    2 +
 .../set_property/LINK_LIBRARIES-stdout.txt         |    1 +
 Tests/RunCMake/set_property/LINK_LIBRARIES.cmake   |    9 +--
 Tests/RunCMake/set_property/RunCMakeTest.cmake     |    5 ++
 Tests/RunCMake/set_property/SOURCES-stdout.txt     |    1 +
 Tests/RunCMake/set_property/SOURCES.cmake          |    2 +
 .../hello.f => Tests/RunCMake/set_property/a       |    0
 .../hello.f => Tests/RunCMake/set_property/b       |    0
 .../hello.f => Tests/RunCMake/set_property/c       |    0
 .../hello.f => Tests/RunCMake/set_property/d       |    0
 .../hello.f => Tests/RunCMake/set_property/e       |    0
 20 files changed, 84 insertions(+), 31 deletions(-)
 create mode 100644 Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake
 create mode 100644 Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/COMPILE_FEATURES.cmake
 create mode 100644 Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake
 create mode 100644 Tests/RunCMake/set_property/Common.cmake
 create mode 100644 Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake
 create mode 100644 Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/SOURCES-stdout.txt
 create mode 100644 Tests/RunCMake/set_property/SOURCES.cmake
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/a (100%)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/b (100%)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/c (100%)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/d (100%)
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/set_property/e (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list