summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-23 14:53:39 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-23 14:53:39 (GMT)
commit4fc47424774657a44fc6ac118d1d1abb360db38c (patch)
tree2a88a352fd672405b8e8e7ac48a2f6475124378b /Tests/ExportImport
parentebb54e02c4bfd9ef8ffb92a49afb873a0af58f2a (diff)
downloadCMake-4fc47424774657a44fc6ac118d1d1abb360db38c.zip
CMake-4fc47424774657a44fc6ac118d1d1abb360db38c.tar.gz
CMake-4fc47424774657a44fc6ac118d1d1abb360db38c.tar.bz2
Tests: Fix ExportImport on AIX with GCC
The iface_test_bld gets the excludedFromAll include directory with "-isystem" because it is added indirectly through an imported target. On AIX with GCC the -isystem flag causes sources to be preprocessed as: # 3 "/.../excludedFromAll.h" 2 3 4 The flags after the file name are documented here: https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html and the "4" flag says that following content is extern "C". This causes the excludedFromAll function to be declared as a C symbol and not mangled for C++, which fails to link later because the symbol is really provided as C++. Work around this by setting the NO_SYSTEM_FROM_IMPORTED target property on iface_test_bld. Somehow iface_test_exp does not end up with -isystem so we do not need this workaround for that target.
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index ced7b03..17d983a 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -255,6 +255,7 @@ add_subdirectory(excludedFromAll)
add_executable(iface_test_bld iface_test.cpp)
target_link_libraries(iface_test_bld bld_testSharedLibDepends)
+set_property(TARGET iface_test_bld PROPERTY NO_SYSTEM_FROM_IMPORTED 1)
set_property(TARGET bld_testSharedLibRequired APPEND PROPERTY
LINK_INTERFACE_LIBRARIES