[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3935-g5641e9c
Stephen Kelly
steveire at gmail.com
Tue Aug 20 11:08:18 EDT 2013
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 5641e9c86eaa41d0c21c05f88631470a62f95048 (commit)
via 2bff6b007c8be35e608303a39c2fd7ca3195a947 (commit)
via d7c9d60d9fa552a22944d9a912dd61539e012102 (commit)
via 56cf74e73446f61b9ac84837931ea79c8e90d42c (commit)
from e4ad5858b032d5347eb7755a4b887ae880559ea9 (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=5641e9c86eaa41d0c21c05f88631470a62f95048
commit 5641e9c86eaa41d0c21c05f88631470a62f95048
Merge: e4ad585 2bff6b0
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Aug 20 11:08:16 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 20 11:08:16 2013 -0400
Merge topic 'find-IMPORTED-in-LINK_DEPENDENT_LIBRARIES' into next
2bff6b0 Find IMPORTED targets in the LINK_DEPENDENT_LIBRARIES property.
d7c9d60 CMake Nightly Date Stamp
56cf74e CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bff6b007c8be35e608303a39c2fd7ca3195a947
commit 2bff6b007c8be35e608303a39c2fd7ca3195a947
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Aug 19 11:57:13 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Aug 20 16:59:34 2013 +0200
Find IMPORTED targets in the LINK_DEPENDENT_LIBRARIES property.
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index e7b185a..0a17232 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -93,7 +93,8 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target,
{
properties[i->first] = i->second.GetValue();
- if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0)
+ if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
+ || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0)
{
const std::string libs = i->second.GetValue();
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index b5b2027..fb2ca86 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -213,6 +213,19 @@ set_property(TARGET testSharedLibRequired APPEND PROPERTY
$<$<CXX_COMPILER_ID:GNU>:-DCUSTOM_COMPILE_OPTION>
)
+add_library(testSharedLibRequiredUser SHARED testSharedLibRequiredUser.cpp)
+generate_export_header(testSharedLibRequiredUser)
+# LINK_PRIVATE so that it appears in the LINK_DEPENDENT_LIBRARIES, but not
+# the INTERFACE_LINK_LIBRARIES.
+set_property(TARGET testSharedLibRequiredUser APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+)
+target_link_libraries(testSharedLibRequiredUser LINK_PRIVATE testSharedLibRequired)
+install(FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/testSharedLibRequiredUser.h"
+ "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser_export.h"
+ DESTINATION include/testSharedLibRequiredUser
+)
add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
@@ -284,6 +297,7 @@ install(TARGETS
testLibIncludeRequired5
testLibIncludeRequired6
testSharedLibRequired
+ testSharedLibRequiredUser
noIncludesInterface
EXPORT RequiredExp DESTINATION lib
INCLUDES DESTINATION
@@ -384,7 +398,7 @@ add_subdirectory(sublib) # For CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE test.
# Export from build tree.
export(TARGETS testExe1 testLib1 testLib2 testLib3
testExe2libImp testLib3Imp testLib3ImpDep subdirlib
- testSharedLibRequired testSharedLibDepends renamed_on_export
+ testSharedLibRequired testSharedLibRequiredUser testSharedLibDepends renamed_on_export
cmp0022NEW cmp0022OLD
NAMESPACE bld_
FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp b/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp
new file mode 100644
index 0000000..5580005
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser.cpp
@@ -0,0 +1,10 @@
+
+#include "testSharedLibRequiredUser.h"
+
+#include "testSharedLibRequired.h"
+
+int TestSharedLibRequiredUser::foo()
+{
+ TestSharedLibRequired req;
+ return req.foo();
+}
diff --git a/Tests/ExportImport/Export/testSharedLibRequiredUser.h b/Tests/ExportImport/Export/testSharedLibRequiredUser.h
new file mode 100644
index 0000000..58bcaa5
--- /dev/null
+++ b/Tests/ExportImport/Export/testSharedLibRequiredUser.h
@@ -0,0 +1,12 @@
+
+#ifndef TESTSHAREDLIBREQUIREDUSER_H
+#define TESTSHAREDLIBREQUIREDUSER_H
+
+#include "testsharedlibrequireduser_export.h"
+
+struct TESTSHAREDLIBREQUIREDUSER_EXPORT TestSharedLibRequiredUser
+{
+ int foo();
+};
+
+#endif
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
index 5600dff..0e57c17 100644
--- a/Tests/ExportImport/Import/try_compile/CMakeLists.txt
+++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt
@@ -5,17 +5,17 @@ find_package(testLibRequired 2.5 REQUIRED)
include(CheckCXXSourceCompiles)
-set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequired)
+set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequiredUser)
check_cxx_source_compiles(
"
-#include \"testSharedLibRequired.h\"
+#include \"testSharedLibRequiredUser.h\"
int main(int argc, char **argv)
{
- TestSharedLibRequired req;
- return req.foo();
+ TestSharedLibRequiredUser user;
+ return user.foo();
}
-" SHARED_LIB_REQUIRED)
+" SHARED_LIB_DEPENDS)
-if(NOT SHARED_LIB_REQUIRED)
+if(NOT SHARED_LIB_DEPENDS)
message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}")
endif()
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmExportTryCompileFileGenerator.cxx | 3 ++-
Tests/ExportImport/Export/CMakeLists.txt | 16 +++++++++++++++-
.../Export/testSharedLibRequiredUser.cpp | 10 ++++++++++
.../Export/testSharedLibRequiredUser.h | 12 ++++++++++++
.../ExportImport/Import/try_compile/CMakeLists.txt | 12 ++++++------
6 files changed, 46 insertions(+), 9 deletions(-)
create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser.cpp
create mode 100644 Tests/ExportImport/Export/testSharedLibRequiredUser.h
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list