From 974e1b5bb6822a96aac25f5e35d1405b0c36b279 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Sat, 3 Feb 2007 01:55:46 +0000 Subject: [PATCH] detect 64bit processors and add -fPIC this is an intermediate solution as I probably can use ADD_DEFINES() to add the command line options for the compiler instead of fiddingly with CMAKE variables Props to Brandon for finding the solution in an openwengo patch. http://dev.openwengo.org/trac/openwengo/trac.cgi/changeset/9139 Long Live CMake! --- makelib/Platform.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/makelib/Platform.cmake b/makelib/Platform.cmake index 87d8164..ee55fec 100644 --- a/makelib/Platform.cmake +++ b/makelib/Platform.cmake @@ -16,14 +16,16 @@ ELSE(PYTHONINTERP_FOUND) SET(PYTHON_LINKFORSTATIC "") ENDIF(PYTHONINTERP_FOUND) -MACRO(GET_MUSSA_COMPILE_FLAGS return) - SET(return "") - IF(APPLE) - SET(${return} - ${${return}} - "-isysroot /Developer/SDKS/MacOSX10.4u.sdk -arch ppc -arch i386 -I/usr/local/include" - ) - ENDIF(APPLE) +MACRO(GET_MUSSA_COMPILE_FLAGS) + SET(${return} "") + IF(APPLE) + ADD_DEFINITIONS("-isysroot /Developer/SDKS/MacOSX10.4u.sdk -arch ppc -arch i386 -I/usr/local/include") + ENDIF(APPLE) + IF (UNIX AND NOT WIN32) + IF (CMAKE_SIZEOF_VOID_P MATCHES "8") + ADD_DEFINITIONS("-fPIC") + ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") + ENDIF(UNIX AND NOT WIN32) ENDMACRO(GET_MUSSA_COMPILE_FLAGS) MACRO(GET_MUSSA_LINK_FLAGS return) -- 2.30.2