diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Tests/ExportImport/Import/try_compile/CMakeLists.txt | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Tests/ExportImport/Import/try_compile/CMakeLists.txt')
-rw-r--r-- | Tests/ExportImport/Import/try_compile/CMakeLists.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt new file mode 100644 index 000000000..5600dffdf --- /dev/null +++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 2.8) + +find_package(testLibRequired 2.5 REQUIRED) + +include(CheckCXXSourceCompiles) + +set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequired) +check_cxx_source_compiles( + " +#include \"testSharedLibRequired.h\" +int main(int argc, char **argv) +{ + TestSharedLibRequired req; + return req.foo(); +} +" SHARED_LIB_REQUIRED) + +if(NOT SHARED_LIB_REQUIRED) + message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}") +endif() |