diff options
author | Brad King <brad.king@kitware.com> | 2009-07-11 14:10:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-11 14:10:51 (GMT) |
commit | 3621e073a88433af4408a8d7d58974b4e8254b54 (patch) | |
tree | 770cb042e07ef712ce4ec395985881f7735e096e /Tests/ExportImport/Import | |
parent | 28b1912aa3eba8427cc3d0a4954f7366fcb338b9 (diff) | |
download | CMake-3621e073a88433af4408a8d7d58974b4e8254b54.zip CMake-3621e073a88433af4408a8d7d58974b4e8254b54.tar.gz CMake-3621e073a88433af4408a8d7d58974b4e8254b54.tar.bz2 |
ENH: Test export/import of link interface languages
This extends the ExportImport test. The Export project creates a C++
static library and exports it. Then the Import project links the
library into a C executable. On most platforms the executable will link
only if the C++ linker is chosen correctly.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/imp_testExe1.c | 3 | ||||
-rw-r--r-- | Tests/ExportImport/Import/CMakeLists.txt | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index e874cdb..f6536df 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -28,6 +28,7 @@ target_link_libraries(imp_testExe1 exp_testLib3 exp_testLib4 exp_testLib5 + exp_testLib6 ) # Try building a plugin to an executable imported from the install tree. @@ -58,6 +59,7 @@ target_link_libraries(imp_testExe1b bld_testLib3 bld_testLib4 bld_testLib5 + bld_testLib6 ) # Try building a plugin to an executable imported from the build tree. diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c index 6a6ba0f..b690d99 100644 --- a/Tests/ExportImport/Import/A/imp_testExe1.c +++ b/Tests/ExportImport/Import/A/imp_testExe1.c @@ -5,6 +5,7 @@ extern int testLib3(); extern int testLib4(); extern int testLib4lib(); extern int testLib5(); +extern int testLib6(); /* Switch a symbol between debug and optimized builds to make sure the proper library is found from the testLib4 link interface. */ @@ -18,6 +19,6 @@ extern testLib4libcfg(void); int main() { return (testLib2() + generated_by_testExe1() + testLib3() + testLib4() - + testLib5() + + testLib5() + testLib6() + generated_by_testExe3() + testLib4lib() + testLib4libcfg()); } diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt index eb3a954..3fc78a2 100644 --- a/Tests/ExportImport/Import/CMakeLists.txt +++ b/Tests/ExportImport/Import/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required (VERSION 2.6) -project(Import C) +cmake_minimum_required (VERSION 2.7.20090711) +project(Import C CXX) # Import everything in a subdirectory. add_subdirectory(A) |