summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'SetFlags.cmake')
-rw-r--r--SetFlags.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index bde3be549..357cb9e7c 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -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()