[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1586-gc79877f
Stephen Kelly
steveire at gmail.com
Sun Jan 13 04:22:08 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via c79877fe6cecd8755f8e624e3535271ea4764f51 (commit)
via cf7516ad6cbbe4d7280800652d541eb941179538 (commit)
from 75a6f6b175542d599fd75daa0443493014da3c7f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c79877fe6cecd8755f8e624e3535271ea4764f51
commit c79877fe6cecd8755f8e624e3535271ea4764f51
Merge: 75a6f6b cf7516a
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 04:22:07 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 13 04:22:07 2013 -0500
Merge topic 'test-export-iface-genex' into next
cf7516a Make sure -fPIC can be expected to work before testing it.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf7516ad6cbbe4d7280800652d541eb941179538
commit cf7516ad6cbbe4d7280800652d541eb941179538
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 10:20:35 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 10:20:35 2013 +0100
Make sure -fPIC can be expected to work before testing it.
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 72d11b6..4812e7e 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -167,6 +167,24 @@ target_link_libraries(deps_shared_iface testSharedLibDepends)
target_include_directories(deps_shared_iface PRIVATE testSharedLibDepends)
target_compile_definitions(deps_shared_iface PRIVATE testSharedLibDepends)
+if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag(-fPIE run_pic_test)
+else()
+ if (CMAKE_CXX_COMPILER_ID MATCHES "PGI"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "PathScale"
+ OR CMAKE_SYSTEM_NAME MATCHES "IRIX64"
+ OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ set(run_pic_test 0)
+ else()
+ set(run_pic_test 1)
+ endif()
+endif()
+
+if (run_pic_test)
+ target_compile_definitions(deps_shared_iface PRIVATE CHECK_PIC_WORKS)
+endif()
+
#-----------------------------------------------------------------------------
# Test that targets imported from the build tree have their dependencies
# evaluated correctly. The above already tests the same for the install tree.
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index d3521b7..43f832a 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -2,9 +2,11 @@
#include "testSharedLibDepends.h"
+#ifdef CHECK_PIC_WORKS
#if defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
#error Expected by INTERFACE_POSITION_INDEPENDENT_CODE property of dependency
#endif
+#endif
#ifdef TEST_SUBDIR_LIB
#include "subdir.h"
-----------------------------------------------------------------------
Summary of changes:
Tests/ExportImport/Import/A/CMakeLists.txt | 18 ++++++++++++++++++
Tests/ExportImport/Import/A/deps_shared_iface.cpp | 2 ++
2 files changed, 20 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list