File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ if(CCACHE_PROGRAM)
6666endif (CCACHE_PROGRAM )
6767
6868MESSAGE (STATUS "ARCHITECTURE: ${CMAKE_SYSTEM_PROCESSOR} " )
69+ set (PULSAR_TARGET_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR} " )
70+ if (APPLE AND CMAKE_OSX_ARCHITECTURES)
71+ list (LENGTH CMAKE_OSX_ARCHITECTURES PULSAR_OSX_ARCH_COUNT)
72+ if (PULSAR_OSX_ARCH_COUNT EQUAL 1)
73+ set (PULSAR_TARGET_PROCESSOR "${CMAKE_OSX_ARCHITECTURES} " )
74+ endif ()
75+ endif ()
76+ MESSAGE (STATUS "TARGET_ARCHITECTURE: ${PULSAR_TARGET_PROCESSOR} " )
6977
7078option (BUILD_DYNAMIC_LIB "Build dynamic lib" ON )
7179MESSAGE (STATUS "BUILD_DYNAMIC_LIB: " ${BUILD_DYNAMIC_LIB} )
@@ -99,7 +107,7 @@ else() # GCC or Clang are mostly compatible:
99107 add_compile_options (-Wall -Wformat-security -Wvla -Werror )
100108 # Turn off certain warnings that are too much pain for too little gain:
101109 add_compile_options (-Wno-sign-compare -Wno-deprecated-declarations -Wno-error=cpp )
102- if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
110+ if (PULSAR_TARGET_PROCESSOR STREQUAL "x86_64" )
103111 add_compile_options (-msse4.2 -mpclmul )
104112 endif ()
105113 # Options unique to Clang or GCC:
You can’t perform that action at this time.
0 commit comments