From 93034a8350102e308fa5bca8d89bf3f6fae12771 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 10 Jan 2013 17:11:12 +0100 Subject: Fix linking to imported libraries test. Make a C executable instead of attempting to make a C++ static library (and not really succeeding). This was introduced in commit 894f52f3 (Handle INTERFACE properties transitively for includes and defines., 2012-09-23). --- Tests/ExportImport/Import/A/CMakeLists.txt | 4 ++-- Tests/ExportImport/Import/A/deps_iface.c | 24 ++++++++++++++++++++++++ Tests/ExportImport/Import/A/deps_iface.cpp | 24 ------------------------ 3 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 Tests/ExportImport/Import/A/deps_iface.c delete mode 100644 Tests/ExportImport/Import/A/deps_iface.cpp diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index b77562e..56cfea0 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -157,8 +157,8 @@ endif() # Test that dependent imported targets have usable # INTERFACE_COMPILE_DEFINITIONS and INTERFACE_INCLUDE_DIRECTORIES -add_library(deps_iface deps_iface.cpp) -target_link_libraries(deps_iface testLibsDepends) +add_executable(deps_iface deps_iface.c) +target_link_libraries(deps_iface testLibDepends) set_property(TARGET deps_iface APPEND PROPERTY COMPILE_DEFINITIONS $ diff --git a/Tests/ExportImport/Import/A/deps_iface.c b/Tests/ExportImport/Import/A/deps_iface.c new file mode 100644 index 0000000..e73ca26 --- /dev/null +++ b/Tests/ExportImport/Import/A/deps_iface.c @@ -0,0 +1,24 @@ + +#include "testLibIncludeRequired1.h" +#include "testLibIncludeRequired2.h" +#include "testLibIncludeRequired6.h" + +#ifndef testLibRequired_IFACE_DEFINE +#error Expected testLibRequired_IFACE_DEFINE +#endif + +#ifdef BuildOnly_DEFINE +#error Unexpected BuildOnly_DEFINE +#endif + +#ifndef InstallOnly_DEFINE +#error Expected InstallOnly_DEFINE +#endif + +extern int testLibDepends(void); + + +int main() +{ + return testLibDepends(); +} diff --git a/Tests/ExportImport/Import/A/deps_iface.cpp b/Tests/ExportImport/Import/A/deps_iface.cpp deleted file mode 100644 index 7190b92..0000000 --- a/Tests/ExportImport/Import/A/deps_iface.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -#include "testLibIncludeRequired1.h" -#include "testLibIncludeRequired2.h" -#include "testLibIncludeRequired6.h" - -#ifndef testLibRequired_IFACE_DEFINE -#error Expected testLibRequired_IFACE_DEFINE -#endif - -#ifdef BuildOnly_DEFINE -#error Unexpected BuildOnly_DEFINE -#endif - -#ifndef InstallOnly_DEFINE -#error Expected InstallOnly_DEFINE -#endif - -extern int testLibDepends(void); - - -int main(int,char **) -{ - return testLibDepends(); -} -- cgit v0.12