summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-21 20:58:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-02-21 20:58:27 (GMT)
commit8ef15df7000bc514b941f04784bccb340f9638b4 (patch)
treebd9f342759ea7b1f08db3a9e5dcbca9b2d3c7a44 /Tests
parentbf6560091d2d3cc2c57852d414580643036a1974 (diff)
parent35c48e12706f9426eda43b3b077925a2fab0df44 (diff)
downloadCMake-8ef15df7000bc514b941f04784bccb340f9638b4.zip
CMake-8ef15df7000bc514b941f04784bccb340f9638b4.tar.gz
CMake-8ef15df7000bc514b941f04784bccb340f9638b4.tar.bz2
Merge topic 'HandleTargetsInCMakeRequiredLibraries'
35c48e1 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES 61cb4ea bootstrap: move while() and endwhile() into the bootstrap build c9f2886 -don't pull in CheckTypeSize.cmake from the cmake which is being built 628f365 -remove trailing whitespace
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index e65e362..a21e1b0 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -137,3 +137,14 @@ add_library(imp_lib1 STATIC imp_lib1.c)
target_link_libraries(imp_lib1 exp_testLib2)
add_library(imp_lib1b STATIC imp_lib1.c)
target_link_libraries(imp_lib1b bld_testLib2)
+
+#-----------------------------------------------------------------------------
+# Test that handling imported targets, including transitive dependencies,
+# works in CheckFunctionExists (...and hopefully all other try_compile() checks
+include(CheckFunctionExists)
+unset(HAVE_TESTLIB1_FUNCTION CACHE)
+set(CMAKE_REQUIRED_LIBRARIES exp_testLib2)
+check_function_exists(testLib1 HAVE_TESTLIB1_FUNCTION)
+if (NOT HAVE_TESTLIB1_FUNCTION)
+ message(SEND_ERROR "Using imported target testLib2 in check_function_exists() failed !")
+endif()