[Cmake-commits] CMake branch, next, updated. v2.8.8-3000-g3775998
Stephen Kelly
steveire at gmail.com
Tue Jun 5 09:44:11 EDT 2012
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 37759984172555e0b892b26f2cd7410b8eadb5db (commit)
via 6f0e3f895e96a6b766b024a2279b4222199a82a2 (commit)
via 9005e6a49340deba3701ddbaadc620c0f813c222 (commit)
from cf85f70a90fa18d94a953bab7269eacf990fc00b (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=37759984172555e0b892b26f2cd7410b8eadb5db
commit 37759984172555e0b892b26f2cd7410b8eadb5db
Merge: cf85f70 6f0e3f8
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 5 09:44:07 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 5 09:44:07 2012 -0400
Merge topic 'position-independent-targets' into next
6f0e3f8 Export symbols from shared libraries.
9005e6a Revert "Don't run the PositionIndependentCode test on WIN32."
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f0e3f895e96a6b766b024a2279b4222199a82a2
commit 6f0e3f895e96a6b766b024a2279b4222199a82a2
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 5 13:20:36 2012 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jun 5 13:20:36 2012 +0200
Export symbols from shared libraries.
Part of what this branch adds is flags for shared libraries, so that
needs to be tested.
diff --git a/Tests/PositionIndependentTargets/global/CMakeLists.txt b/Tests/PositionIndependentTargets/global/CMakeLists.txt
index f2ecfb2..1d662f8 100644
--- a/Tests/PositionIndependentTargets/global/CMakeLists.txt
+++ b/Tests/PositionIndependentTargets/global/CMakeLists.txt
@@ -8,10 +8,17 @@ add_executable(test_target_executable_global
add_library(test_target_shared_library_global
SHARED "${CMAKE_CURRENT_SOURCE_DIR}/../pic_lib.cpp"
)
+set_target_properties(test_target_shared_library_global
+ PROPERTIES DEFINE_SYMBOL PIC_TEST_BUILD_DLL
+)
add_library(test_target_static_library_global
STATIC "${CMAKE_CURRENT_SOURCE_DIR}/../pic_lib.cpp"
)
+set_target_properties(test_target_static_library_global
+ PROPERTIES COMPILE_DEFINITIONS PIC_TEST_STATIC_BUILD
+)
+
file(READ
"${CMAKE_CURRENT_SOURCE_DIR}/../pic_test.h"
diff --git a/Tests/PositionIndependentTargets/pic_lib.cpp b/Tests/PositionIndependentTargets/pic_lib.cpp
index 085b189..ec351b4 100644
--- a/Tests/PositionIndependentTargets/pic_lib.cpp
+++ b/Tests/PositionIndependentTargets/pic_lib.cpp
@@ -1,2 +1,10 @@
#include "pic_test.h"
+
+class PIC_TEST_EXPORT Dummy
+{
+ int dummy()
+ {
+ return 0;
+ }
+};
diff --git a/Tests/PositionIndependentTargets/pic_test.h b/Tests/PositionIndependentTargets/pic_test.h
index 5c88670..3f64557 100644
--- a/Tests/PositionIndependentTargets/pic_test.h
+++ b/Tests/PositionIndependentTargets/pic_test.h
@@ -4,3 +4,17 @@
# error "The POSITION_INDEPENDENT_CODE property should cause __PIC__ to be defined on ELF platforms."
# endif
#endif
+
+#if defined(PIC_TEST_STATIC_BUILD)
+# define PIC_TEST_EXPORT
+#else
+# if defined(_WIN32) || defined(WIN32) /* Win32 version */
+# ifdef PIC_TEST_BUILD_DLL
+# define PIC_TEST_EXPORT __declspec(dllexport)
+# else
+# define PIC_TEST_EXPORT __declspec(dllimport)
+# endif
+# else
+# define PIC_TEST_EXPORT
+# endif
+#endif
diff --git a/Tests/PositionIndependentTargets/targets/CMakeLists.txt b/Tests/PositionIndependentTargets/targets/CMakeLists.txt
index bdc30d5..4724c85 100644
--- a/Tests/PositionIndependentTargets/targets/CMakeLists.txt
+++ b/Tests/PositionIndependentTargets/targets/CMakeLists.txt
@@ -9,10 +9,12 @@ add_library(test_target_shared_library_properties SHARED "${CMAKE_CURRENT_SOURCE
set_target_properties(test_target_shared_library_properties
PROPERTIES
POSITION_INDEPENDENT_CODE True
+ DEFINE_SYMBOL PIC_TEST_BUILD_DLL
)
add_library(test_target_static_library_properties STATIC "${CMAKE_CURRENT_SOURCE_DIR}/../pic_lib.cpp")
set_target_properties(test_target_static_library_properties
PROPERTIES
POSITION_INDEPENDENT_CODE True
+ COMPILE_DEFINITIONS PIC_TEST_STATIC_BUILD
)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9005e6a49340deba3701ddbaadc620c0f813c222
commit 9005e6a49340deba3701ddbaadc620c0f813c222
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 5 13:00:30 2012 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jun 5 13:00:30 2012 +0200
Revert "Don't run the PositionIndependentCode test on WIN32."
This reverts commit e8b958b7cc9f2533ad0c577db23c39c0de400cad.
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index a82a1bd..76c45fa 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -315,9 +315,7 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader)
- if(NOT WIN32)
- ADD_TEST_MACRO(PositionIndependentTargets PositionIndependentTargets)
- endif()
+ ADD_TEST_MACRO(PositionIndependentTargets PositionIndependentTargets)
ADD_TEST(LinkFlags-prepare
${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
-----------------------------------------------------------------------
Summary of changes:
Tests/CMakeLists.txt | 4 +---
.../global/CMakeLists.txt | 7 +++++++
Tests/PositionIndependentTargets/pic_lib.cpp | 8 ++++++++
Tests/PositionIndependentTargets/pic_test.h | 14 ++++++++++++++
.../targets/CMakeLists.txt | 2 ++
5 files changed, 32 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list