From f43528035a5b0953a3e049e8a83cfc5dc994283f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 16 Nov 2007 01:27:02 -0800 Subject: Check for GCC's destructor attribute before using it --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') 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}") -- cgit v1.2.3