cmake: improve previous commit

Avoid to set -m32 two times

Fix issue #463
This commit is contained in:
Gregory Hainaut 2015-02-27 10:02:38 +01:00
parent b5612ec622
commit fb100e05f2
1 changed files with 2 additions and 2 deletions

View File

@ -6,12 +6,12 @@ set(CMAKE_SYSTEM_PROCESSOR i686)
# Leave it generic to only support amd64 or x32 to i386 with any compiler.
if ("$ENV{CC}" STREQUAL "")
set(CMAKE_C_COMPILER cc -m32)
else()
elseif(NOT "$ENV{CC}" MATCHES "-m32")
set(CMAKE_C_COMPILER $ENV{CC} -m32)
endif()
if ("$ENV{CXX}" STREQUAL "")
set(CMAKE_CXX_COMPILER c++ -m32)
else()
elseif(NOT "$ENV{CXX}" MATCHES "-m32")
set(CMAKE_CXX_COMPILER $ENV{CXX} -m32)
endif()