From 490d1c6a8ec45bb6cfd80f92155ae6ae93098785 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Nov 2010 14:27:07 -0800 Subject: Prefer GCC's constructor, even in Windows --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c629c425..c9de3285 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,11 +119,11 @@ ELSE() "Flags used by the compiler during debug builds." FORCE) + CHECK_C_SOURCE_COMPILES("int foo() __attribute__((destructor)); + int main() {return 0;}" HAVE_GCC_DESTRUCTOR) + # 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_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_SWITCH) IF(HAVE_VISIBILITY_SWITCH) CHECK_C_SOURCE_COMPILES("int foo() __attribute__((visibility(\"default\"))); -- cgit v1.2.3