aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-11-16 01:27:02 -0800
committerChris Robinson <[email protected]>2007-11-16 01:27:02 -0800
commitf43528035a5b0953a3e049e8a83cfc5dc994283f (patch)
treec7ddee0a8dab482cf0f87676cb4e3aac5818142b /CMakeLists.txt
parenta3ceffa7e0194e06a66b7f18c0fc6e88a5b2d52a (diff)
Check for GCC's destructor attribute before using it
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2aceb1ab..3084042c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,6 +71,9 @@ ELSE()
# Set visibility options if available
IF(NOT "${WIN32}")
+ CHECK_C_SOURCE_COMPILES("int foo() __attribute__((destructor));
+ int main() {return 0;}" HAVE_GCC_DESTRUCTOR)
+
CHECK_C_SOURCE_COMPILES("int foo() __attribute__((visibility(\"default\")));
int main() {return 0;}" HAVE_GCC_VISIBILITY)
IF("${HAVE_GCC_VISIBILITY}")