Change CROSSCOMPILE flag to NO_NATIVE_OPTIMIZATION (#3279)
* Change CROSSCOMPILE flag to NOMARCHNATIVE. The old name was confusing, the new name describes exactly what it does. This fixes issue #3272 * Break configuration when using CROSSCOMPILE. This stops any old build scripts from producing broken builds. * Use NO_NATIVE_OPTIMIZATION rather than NOMARCHNATIVE. Addresses @madmaxoft's concerns.
This commit is contained in:
committed by
GitHub
parent
62702cab48
commit
9e52982f0e
@@ -124,10 +124,14 @@ macro(set_flags)
|
||||
|
||||
|
||||
# Have the compiler generate code specifically targeted at the current machine on Linux
|
||||
if(LINUX AND NOT CROSSCOMPILE)
|
||||
if(LINUX AND NOT NO_NATIVE_OPTIMIZATION)
|
||||
add_flags_cxx("-march=native")
|
||||
endif()
|
||||
|
||||
if(CROSSCOMPILE)
|
||||
message(FATAL_ERROR "The CROSSCOMPILE flag has been renamed to NO_NATIVE_OPTIMIZATION. Please update your build scripts to compile Cuberite.")
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
get_clang_version()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user