diff --git a/cpp/BoostParts/CMakeLists.txt b/cpp/BoostParts/CMakeLists.txt index 8078a022..de8485fe 100644 --- a/cpp/BoostParts/CMakeLists.txt +++ b/cpp/BoostParts/CMakeLists.txt @@ -107,7 +107,7 @@ endif() ############################################################################# # Linking fails without this -if( NOT WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" ) +if( NOT WIN32 AND 64_BIT_PLATFORM ) set_target_properties( BoostParts PROPERTIES COMPILE_FLAGS "-fPIC") endif() diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f7c4afb2..909f8de1 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -83,12 +83,10 @@ else() endif() # Check if platform is 64 bit -if( NOT APPLE ) - if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) - set( 64_BIT_PLATFORM 0 ) - else() - set( 64_BIT_PLATFORM 1 ) - endif() +if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) + set( 64_BIT_PLATFORM 0 ) +else() + set( 64_BIT_PLATFORM 1 ) endif() add_subdirectory( BoostParts )