Skip to content

Commit a11e30e

Browse files
committed
add ability to turn off native arch
1 parent 5d23335 commit a11e30e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ set (BOOST_CXX_FLAGS "-Wno-deprecated-register -std=c++11")
3131
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
3232

3333
## Set the standard required compile flags
34-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -pthread -funroll-loops -fPIC -fomit-frame-pointer -O4 -DHAVE_ANSI_TERM -Wall -std=c++11 -Wreturn-type -Werror=return-type")
34+
if (NO_NATIVE_ARCH)
35+
message (STATUS "DISABLING NATIVE ARCH.")
36+
else()
37+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
38+
endif()
39+
40+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -funroll-loops -fPIC -fomit-frame-pointer -O4 -DHAVE_ANSI_TERM -Wall -std=c++11 -Wreturn-type -Werror=return-type")
3541

3642
##
3743
# OSX is strange (some might say, stupid in this regard). Deal with it's quirkines here.

0 commit comments

Comments
 (0)