[Cmake-commits] CMake branch, master, updated. v3.8.1-1246-g6867b88

Kitware Robot kwrobot at kitware.com
Fri May 19 14:25:06 EDT 2017


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, master has been updated
       via  6867b882ec2167f6da5d9cdc22409eb7acba179d (commit)
       via  555f234fa28b1dde4edfaca644de680391941cd4 (commit)
       via  caba59b8faadaf971f0a16a8abc44c9e50b198f3 (commit)
       via  561e5edc3c63495bb7f9d09b5b1fda136bc07cf4 (commit)
       via  a2f1c8bd98decaaf7402519217dbf0fd386f92ff (commit)
       via  94cd4505f7d6884c9ed9b596dcb34112483d42e4 (commit)
       via  87a37e647587d4891b36db92bd33950ccc864c6b (commit)
       via  5a913794d2931c3de00464cf261215a173f5ab8b (commit)
       via  70c6557285793d9944f4177d3bee3f1570ace308 (commit)
       via  37627217082be815cb42611d1d23721ad0799c5c (commit)
       via  e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d (commit)
       via  f29635b66746324e1d6e1f17097dd7bd4ed347b0 (commit)
       via  1bfe37201a0b5fb25f775ec34e25a2a184529489 (commit)
       via  fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04 (commit)
      from  de41f3b38c0d5e8d7045cd5e6e96eef72c388d5b (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=6867b882ec2167f6da5d9cdc22409eb7acba179d
commit 6867b882ec2167f6da5d9cdc22409eb7acba179d
Merge: 555f234 87a37e6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 19 18:19:50 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 19 14:20:11 2017 -0400

    Merge topic 'target-depends-per-config'
    
    87a37e64 cmComputeTargetDepends: Avoid nested loops over configurations
    5a913794 cmComputeTargetDepends: Avoid computing with empty configuration
    70c65572 Tests: Fix RunCMake.CMP0022 tll case for Debug configuration
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !865


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=555f234fa28b1dde4edfaca644de680391941cd4
commit 555f234fa28b1dde4edfaca644de680391941cd4
Merge: caba59b 1bfe372
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 19 18:19:17 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 19 14:19:28 2017 -0400

    Merge topic 'solarisEmptyFileFix'
    
    1bfe3720 Tests: Ensure Solaris linker never sees empty contents
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !860


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=caba59b8faadaf971f0a16a8abc44c9e50b198f3
commit caba59b8faadaf971f0a16a8abc44c9e50b198f3
Merge: 561e5ed 94cd450
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 19 18:18:20 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 19 14:18:31 2017 -0400

    Merge topic 'solaris_testLibSONAME'
    
    94cd4505 Tests: Make function name not match SONAME
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !868


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=561e5edc3c63495bb7f9d09b5b1fda136bc07cf4
commit 561e5edc3c63495bb7f9d09b5b1fda136bc07cf4
Merge: a2f1c8b 3762721
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 19 18:17:47 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 19 14:17:50 2017 -0400

    Merge topic 'FindProtobuf-targets'
    
    37627217 Help: Add notes for topic 'FindProtobuf-targets'
    e4e1d194 FindProtobuf: add tests
    f29635b6 FindProtobuf: add targets
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !861


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2f1c8bd98decaaf7402519217dbf0fd386f92ff
commit a2f1c8bd98decaaf7402519217dbf0fd386f92ff
Merge: de41f3b fb6142a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri May 19 18:16:46 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 19 14:16:53 2017 -0400

    Merge topic 'liblzma-fix-inline'
    
    fb6142ab liblzma: Fix HAVE_INLINE and HAVE___INLINE checks
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !867


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94cd4505f7d6884c9ed9b596dcb34112483d42e4
commit 94cd4505f7d6884c9ed9b596dcb34112483d42e4
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Thu May 18 16:13:02 2017 +1000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 18 10:26:09 2017 -0400

    Tests: Make function name not match SONAME
    
    We look for `SONAME` in the output of `readelf` to check whether the
    binary contains the field.  Do not provide a symbol that may
    accidentally match.
    
    Fixes: #16894

diff --git a/Tests/ExportImport/Export/testLibNoSONAME.c b/Tests/ExportImport/Export/testLibNoSONAME.c
index 30acc83..4d98562 100644
--- a/Tests/ExportImport/Export/testLibNoSONAME.c
+++ b/Tests/ExportImport/Export/testLibNoSONAME.c
@@ -4,7 +4,7 @@
 #define testLibNoSONAME_EXPORT
 #endif
 
-testLibNoSONAME_EXPORT int testLibNoSONAME(void)
+testLibNoSONAME_EXPORT int testLibNoSoName(void)
 {
   return 0;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87a37e647587d4891b36db92bd33950ccc864c6b
commit 87a37e647587d4891b36db92bd33950ccc864c6b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 17 13:29:37 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 18 10:18:57 2017 -0400

    cmComputeTargetDepends: Avoid nested loops over configurations
    
    `AddInterfaceDepends` is only called from `CollectTargetDepends` inside
    our loop over all configurations so it doesn't need its own such loop.

diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 8ca8763..ff19eac 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -238,7 +238,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
         // Don't emit the same library twice for this target.
         if (emitted.insert(*lib).second) {
           this->AddTargetDepend(depender_index, *lib, true);
-          this->AddInterfaceDepends(depender_index, *lib, emitted);
+          this->AddInterfaceDepends(depender_index, *lib, *it, emitted);
         }
       }
     }
@@ -273,7 +273,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(
       // Don't emit the same library twice for this target.
       if (emitted.insert(*lib).second) {
         this->AddTargetDepend(depender_index, *lib, true);
-        this->AddInterfaceDepends(depender_index, *lib, emitted);
+        this->AddInterfaceDepends(depender_index, *lib, config, emitted);
       }
     }
   }
@@ -281,7 +281,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(
 
 void cmComputeTargetDepends::AddInterfaceDepends(
   int depender_index, cmLinkItem const& dependee_name,
-  std::set<std::string>& emitted)
+  const std::string& config, std::set<std::string>& emitted)
 {
   cmGeneratorTarget const* depender = this->Targets[depender_index];
   cmGeneratorTarget const* dependee = dependee_name.Target;
@@ -294,17 +294,9 @@ void cmComputeTargetDepends::AddInterfaceDepends(
   }
 
   if (dependee) {
-    std::vector<std::string> configs;
-    depender->Makefile->GetConfigurations(configs);
-    if (configs.empty()) {
-      configs.push_back("");
-    }
-    for (std::vector<std::string>::const_iterator it = configs.begin();
-         it != configs.end(); ++it) {
-      // A target should not depend on itself.
-      emitted.insert(depender->GetName());
-      this->AddInterfaceDepends(depender_index, dependee, *it, emitted);
-    }
+    // A target should not depend on itself.
+    emitted.insert(depender->GetName());
+    this->AddInterfaceDepends(depender_index, dependee, config, emitted);
   }
 }
 
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index ccf99de..e93e376 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -50,6 +50,7 @@ private:
                        bool linking);
   bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
   void AddInterfaceDepends(int depender_index, cmLinkItem const& dependee_name,
+                           const std::string& config,
                            std::set<std::string>& emitted);
   void AddInterfaceDepends(int depender_index,
                            cmGeneratorTarget const* dependee,

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a913794d2931c3de00464cf261215a173f5ab8b
commit 5a913794d2931c3de00464cf261215a173f5ab8b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 17 13:19:15 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 18 10:18:53 2017 -0400

    cmComputeTargetDepends: Avoid computing with empty configuration
    
    Fix `AddInterfaceDepends` to combine all configurations using the
    same approach that `CollectTargetDepends` does.
    
    Fixes: #16896

diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index cfebda2..8ca8763 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -294,9 +294,11 @@ void cmComputeTargetDepends::AddInterfaceDepends(
   }
 
   if (dependee) {
-    this->AddInterfaceDepends(depender_index, dependee, "", emitted);
     std::vector<std::string> configs;
     depender->Makefile->GetConfigurations(configs);
+    if (configs.empty()) {
+      configs.push_back("");
+    }
     for (std::vector<std::string>::const_iterator it = configs.begin();
          it != configs.end(); ++it) {
       // A target should not depend on itself.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70c6557285793d9944f4177d3bee3f1570ace308
commit 70c6557285793d9944f4177d3bee3f1570ace308
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 18 10:15:11 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 18 10:18:50 2017 -0400

    Tests: Fix RunCMake.CMP0022 tll case for Debug configuration
    
    The `CMP0022-WARN-tll` case overrides legacy properties set by
    `target_link_libraries` so that we can verify that the policy
    warning is emitted.  When building in the Debug configuration,
    the `_DEBUG` variant of the legacy property is set/checked too.
    
    Fix the test case to override both variants.  Previously it only
    passed because `cmComputeTargetDepends::AddInterfaceDepends`
    always evaluated dependencies with the "" configuration.

diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
index f672285..5d39214 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
@@ -4,13 +4,13 @@ CMake Warning \(dev\) in CMakeLists.txt:
   cmake_policy command to set the policy and suppress this warning.
 
   Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
-  its LINK_INTERFACE_LIBRARIES properties.
+  its LINK_INTERFACE_LIBRARIES(_DEBUG)? properties.
 
   INTERFACE_LINK_LIBRARIES:
 
     foo
 
-  LINK_INTERFACE_LIBRARIES:
+  LINK_INTERFACE_LIBRARIES(_DEBUG)?:
 
     bat
 
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake
index 11b4e22..03223e8 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake
@@ -5,7 +5,9 @@ add_library(foo SHARED empty_vs6_1.cpp)
 add_library(bar SHARED empty_vs6_2.cpp)
 add_library(bat SHARED empty_vs6_3.cpp)
 target_link_libraries(bar LINK_PUBLIC foo)
+# Replace the compatibility values set by target_link_libraries
 set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES bat)
+set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES_DEBUG bat)
 
 add_library(user SHARED empty.cpp)
 target_link_libraries(user bar)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37627217082be815cb42611d1d23721ad0799c5c
commit 37627217082be815cb42611d1d23721ad0799c5c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 18 09:25:59 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 18 09:26:42 2017 -0400

    Help: Add notes for topic 'FindProtobuf-targets'

diff --git a/Help/release/dev/FindProtobuf-targets.rst b/Help/release/dev/FindProtobuf-targets.rst
new file mode 100644
index 0000000..e38303d
--- /dev/null
+++ b/Help/release/dev/FindProtobuf-targets.rst
@@ -0,0 +1,5 @@
+FindProtobuf-targets
+--------------------
+
+* The :module:`FindProtobuf` module now provides imported targets
+  when the libraries are found.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d
commit e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d
Author:     André Apitzsch <andre.apitzsch at etit.tu-chemnitz.de>
AuthorDate: Thu May 18 13:53:40 2017 +0200
Commit:     André Apitzsch <andre.apitzsch at etit.tu-chemnitz.de>
CommitDate: Thu May 18 13:57:01 2017 +0200

    FindProtobuf: add tests

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2f53cfc..8d8b3aa 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1437,6 +1437,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     add_subdirectory(FindPNG)
   endif()
 
+  if(CMake_TEST_FindProtobuf)
+    add_subdirectory(FindProtobuf)
+  endif()
+
   if(CMake_TEST_FindTIFF)
     add_subdirectory(FindTIFF)
   endif()
diff --git a/Tests/FindProtobuf/CMakeLists.txt b/Tests/FindProtobuf/CMakeLists.txt
new file mode 100644
index 0000000..1cdb2ae
--- /dev/null
+++ b/Tests/FindProtobuf/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_test(NAME FindProtobuf.Test COMMAND
+  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+  --build-and-test
+  "${CMake_SOURCE_DIR}/Tests/FindProtobuf/Test"
+  "${CMake_BINARY_DIR}/Tests/FindProtobuf/Test"
+  ${build_generator_args}
+  --build-project TestFindProtobuf
+  --build-options ${build_options}
+  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+  )
diff --git a/Tests/FindProtobuf/Test/CMakeLists.txt b/Tests/FindProtobuf/Test/CMakeLists.txt
new file mode 100644
index 0000000..d7a5081
--- /dev/null
+++ b/Tests/FindProtobuf/Test/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 3.4)
+project(TestFindProtobuf CXX)
+include(CTest)
+
+find_package(Protobuf REQUIRED)
+
+add_executable(test_tgt main.cxx)
+target_link_libraries(test_tgt Protobuf::protobuf)
+add_test(NAME test_tgt COMMAND test_tgt)
+
+add_executable(test_var main.cxx)
+target_include_directories(test_var PRIVATE ${Protobuf_INCLUDE_DIRS})
+target_link_libraries(test_var PRIVATE ${Protobuf_LIBRARIES})
+add_test(NAME test_var COMMAND test_var)
+
+add_executable(test_tgt_lite main.cxx)
+target_link_libraries(test_tgt_lite Protobuf::protobuf-lite)
+add_test(NAME test_tgt_lite COMMAND test_tgt_lite)
+
+add_executable(test_var_lite main.cxx)
+target_include_directories(test_var_lite PRIVATE ${Protobuf_INCLUDE_DIRS})
+target_link_libraries(test_var_lite PRIVATE ${Protobuf_LITE_LIBRARIES})
+add_test(NAME test_var_lite COMMAND test_var_lite)
+
+add_executable(test_tgt_protoc main-protoc.cxx)
+target_link_libraries(test_tgt_protoc Protobuf::protoc)
+add_test(NAME test_tgt_protoc COMMAND test_tgt_protoc)
+
+add_executable(test_var_protoc main-protoc.cxx)
+target_include_directories(test_var_protoc PRIVATE ${Protobuf_INCLUDE_DIRS})
+target_link_libraries(test_var_protoc PRIVATE ${Protobuf_PROTOC_LIBRARIES})
+add_test(NAME test_var_protoc COMMAND test_var_protoc)
diff --git a/Tests/FindProtobuf/Test/main-protoc.cxx b/Tests/FindProtobuf/Test/main-protoc.cxx
new file mode 100644
index 0000000..64e5ada
--- /dev/null
+++ b/Tests/FindProtobuf/Test/main-protoc.cxx
@@ -0,0 +1,8 @@
+#include <google/protobuf/compiler/command_line_interface.h>
+
+int main()
+{
+  google::protobuf::compiler::CommandLineInterface();
+
+  return 0;
+}
diff --git a/Tests/FindProtobuf/Test/main.cxx b/Tests/FindProtobuf/Test/main.cxx
new file mode 100644
index 0000000..87d5c12
--- /dev/null
+++ b/Tests/FindProtobuf/Test/main.cxx
@@ -0,0 +1,8 @@
+#include <google/protobuf/stubs/common.h>
+
+int main()
+{
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  return 0;
+}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f29635b66746324e1d6e1f17097dd7bd4ed347b0
commit f29635b66746324e1d6e1f17097dd7bd4ed347b0
Author:     André Apitzsch <andre.apitzsch at etit.tu-chemnitz.de>
AuthorDate: Wed May 17 10:04:12 2017 +0200
Commit:     André Apitzsch <andre.apitzsch at etit.tu-chemnitz.de>
CommitDate: Thu May 18 13:57:01 2017 +0200

    FindProtobuf: add targets

diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 102ed42..6dc0444 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -40,6 +40,15 @@
 # ``Protobuf_LITE_LIBRARIES``
 #   The protobuf-lite libraries
 #
+# The following :prop_tgt:`IMPORTED` targets are also defined:
+#
+# ``Protobuf::protobuf``
+#   The protobuf library.
+# ``Protobuf::protobuf-lite``
+#   The protobuf lite library.
+# ``Protobuf::protoc``
+#   The protoc library.
+#
 # The following cache variables are also available to set or use:
 #
 # ``Protobuf_LIBRARY``
@@ -409,6 +418,78 @@ if(Protobuf_INCLUDE_DIR)
       message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}"
           " doesn't match library version ${Protobuf_VERSION}")
   endif()
+
+  if(Protobuf_LIBRARY)
+      if(NOT TARGET Protobuf::protobuf)
+          add_library(Protobuf::protobuf UNKNOWN IMPORTED)
+          set_target_properties(Protobuf::protobuf PROPERTIES
+            INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+          if(EXISTS "${Protobuf_LIBRARY}")
+            set_target_properties(Protobuf::protobuf PROPERTIES
+              IMPORTED_LOCATION "${Protobuf_LIBRARY}")
+          endif()
+          if(EXISTS "${Protobuf_LIBRARY_RELEASE}")
+            set_property(TARGET Protobuf::protobuf APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS RELEASE)
+            set_target_properties(Protobuf::protobuf PROPERTIES
+              IMPORTED_LOCATION_RELEASE "${Protobuf_LIBRARY_RELEASE}")
+          endif()
+          if(EXISTS "${Protobuf_LIBRARY_DEBUG}")
+            set_property(TARGET Protobuf::protobuf APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS DEBUG)
+            set_target_properties(Protobuf::protobuf PROPERTIES
+              IMPORTED_LOCATION_DEBUG "${Protobuf_LIBRARY_DEBUG}")
+          endif()
+      endif()
+  endif()
+
+  if(Protobuf_LITE_LIBRARY)
+      if(NOT TARGET Protobuf::protobuf-lite)
+          add_library(Protobuf::protobuf-lite UNKNOWN IMPORTED)
+          set_target_properties(Protobuf::protobuf-lite PROPERTIES
+            INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+          if(EXISTS "${Protobuf_LITE_LIBRARY}")
+            set_target_properties(Protobuf::protobuf-lite PROPERTIES
+              IMPORTED_LOCATION "${Protobuf_LITE_LIBRARY}")
+          endif()
+          if(EXISTS "${Protobuf_LITE_LIBRARY_RELEASE}")
+            set_property(TARGET Protobuf::protobuf-lite APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS RELEASE)
+            set_target_properties(Protobuf::protobuf-lite PROPERTIES
+              IMPORTED_LOCATION_RELEASE "${Protobuf_LITE_LIBRARY_RELEASE}")
+          endif()
+          if(EXISTS "${Protobuf_LITE_LIBRARY_DEBUG}")
+            set_property(TARGET Protobuf::protobuf-lite APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS DEBUG)
+            set_target_properties(Protobuf::protobuf-lite PROPERTIES
+              IMPORTED_LOCATION_DEBUG "${Protobuf_LITE_LIBRARY_DEBUG}")
+          endif()
+      endif()
+  endif()
+
+  if(Protobuf_PROTOC_LIBRARY)
+      if(NOT TARGET Protobuf::protoc)
+          add_library(Protobuf::protoc UNKNOWN IMPORTED)
+          set_target_properties(Protobuf::protoc PROPERTIES
+            INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
+          if(EXISTS "${Protobuf_PROTOC_LIBRARY}")
+            set_target_properties(Protobuf::protoc PROPERTIES
+              IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}")
+          endif()
+          if(EXISTS "${Protobuf_PROTOC_LIBRARY_RELEASE}")
+            set_property(TARGET Protobuf::protoc APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS RELEASE)
+            set_target_properties(Protobuf::protoc PROPERTIES
+              IMPORTED_LOCATION_RELEASE "${Protobuf_PROTOC_LIBRARY_RELEASE}")
+          endif()
+          if(EXISTS "${Protobuf_PROTOC_LIBRARY_DEBUG}")
+            set_property(TARGET Protobuf::protoc APPEND PROPERTY
+              IMPORTED_CONFIGURATIONS DEBUG)
+            set_target_properties(Protobuf::protoc PROPERTIES
+              IMPORTED_LOCATION_DEBUG "${Protobuf_PROTOC_LIBRARY_DEBUG}")
+          endif()
+      endif()
+  endif()
 endif()
 
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bfe37201a0b5fb25f775ec34e25a2a184529489
commit 1bfe37201a0b5fb25f775ec34e25a2a184529489
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Thu May 18 10:01:17 2017 +1000
Commit:     Craig Scott <craig.scott at constrainttec.com>
CommitDate: Thu May 18 10:32:03 2017 +1000

    Tests: Ensure Solaris linker never sees empty contents
    
    Fixes the following tests on Solaris builds: wrapping, qtwrapping and
    CMakeCommands.target_link_libraries

diff --git a/Tests/CMakeCommands/target_link_libraries/empty.cpp b/Tests/CMakeCommands/target_link_libraries/empty.cpp
index ab32cf6..a6ecef8 100644
--- a/Tests/CMakeCommands/target_link_libraries/empty.cpp
+++ b/Tests/CMakeCommands/target_link_libraries/empty.cpp
@@ -1 +1,3 @@
-// No content
+// Solaris needs non-empty content so ensure
+// we have at least one symbol
+int Solaris_requires_a_symbol_here = 0;
diff --git a/Tests/Wrapping/fakefluid.cxx b/Tests/Wrapping/fakefluid.cxx
index 02c0c52..a118bbd 100644
--- a/Tests/Wrapping/fakefluid.cxx
+++ b/Tests/Wrapping/fakefluid.cxx
@@ -6,7 +6,9 @@ int main(int ac, char** av)
     if (strcmp(av[i], "-o") == 0 || strcmp(av[i], "-h") == 0) {
       fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i + 1]);
       FILE* file = fopen(av[i + 1], "w");
-      fprintf(file, "// hello\n");
+      fprintf(file, "// Solaris needs non-empty content so ensure\n"
+                    "// we have at least one symbol\n"
+                    "int Solaris_requires_a_symbol_here = 0;\n");
       fclose(file);
     }
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04
commit fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 17 15:00:16 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 17 15:00:16 2017 -0400

    liblzma: Fix HAVE_INLINE and HAVE___INLINE checks
    
    The checks fail even on compilers that support the keywords because
    the linkage is broken:
    
        src.c:...: undefined reference to 'test'
    
    At the actual use sites we use `static inline` instead of just `inline`,
    so perform the check this way too to fix the linkage.

diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index e806680..bb3b8a7 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -15,11 +15,11 @@ CHECK_C_SOURCE_COMPILES(
   HAVE___RESTRICT)
 
 CHECK_C_SOURCE_COMPILES(
-  "inline int test (void) {return 0;}\nint main (void) {return test();}"
+  "static inline int test (void) {return 0;}\nint main (void) {return test();}"
   HAVE_INLINE)
 
 CHECK_C_SOURCE_COMPILES (
-  "__inline int test (void) {return 0;}\nint main (void) {return test();}"
+  "static __inline int test (void) {return 0;}\nint main (void) {return test();}"
   HAVE___INLINE)
 
 CHECK_INCLUDE_FILE(byteswap.h HAVE_BYTESWAP_H)

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

Summary of changes:
 Help/release/dev/FindProtobuf-targets.rst          |    5 ++
 Modules/FindProtobuf.cmake                         |   81 ++++++++++++++++++++
 Source/cmComputeTargetDepends.cxx                  |   18 ++---
 Source/cmComputeTargetDepends.h                    |    1 +
 .../CMakeCommands/target_link_libraries/empty.cpp  |    4 +-
 Tests/CMakeLists.txt                               |    4 +
 Tests/ExportImport/Export/testLibNoSONAME.c        |    2 +-
 Tests/{FindGTest => FindProtobuf}/CMakeLists.txt   |    8 +-
 Tests/FindProtobuf/Test/CMakeLists.txt             |   32 ++++++++
 Tests/FindProtobuf/Test/main-protoc.cxx            |    8 ++
 Tests/FindProtobuf/Test/main.cxx                   |    8 ++
 Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt |    4 +-
 Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake      |    2 +
 Tests/Wrapping/fakefluid.cxx                       |    4 +-
 Utilities/cmliblzma/CMakeLists.txt                 |    4 +-
 15 files changed, 162 insertions(+), 23 deletions(-)
 create mode 100644 Help/release/dev/FindProtobuf-targets.rst
 copy Tests/{FindGTest => FindProtobuf}/CMakeLists.txt (52%)
 create mode 100644 Tests/FindProtobuf/Test/CMakeLists.txt
 create mode 100644 Tests/FindProtobuf/Test/main-protoc.cxx
 create mode 100644 Tests/FindProtobuf/Test/main.cxx


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list