Skip to content

Commit e9373fc

Browse files
authored
Merge pull request Tencent#1052 from Crunkle/master
Fix cross-compilation on certain toolchains
2 parents f05edc9 + 9ce6a7e commit e9373fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if(CCACHE_FOUND)
5050
endif(CCACHE_FOUND)
5151

5252
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
53-
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
53+
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "powerpc" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le")
5454
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
5555
else()
5656
#FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.
@@ -80,7 +80,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
8080
endif()
8181
endif()
8282
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
83-
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le")
83+
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "powerpc" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le")
8484
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
8585
else()
8686
#FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER.

0 commit comments

Comments
 (0)