diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-19 11:57:13 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-26 11:36:57 -0400 |
commit | fd4fb9ef040dde7961500e2241b43909a9e6b1a4 (patch) | |
tree | aa25cb1ed0b9645b185dcc10e3f18d4ca596aff1 /Tests/ExportImport/Import | |
parent | d7c9d60d9fa552a22944d9a912dd61539e012102 (diff) | |
download | cmake-fd4fb9ef040dde7961500e2241b43909a9e6b1a4.tar.gz |
try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r-- | Tests/ExportImport/Import/try_compile/CMakeLists.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt index 5600dffdf6..0e57c174c6 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() |