summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2016-07-30 15:22:18 +0200
committerGitHub <noreply@github.com>2016-07-30 15:22:18 +0200
commit9e52982f0e8ce1c99f48d51e38f843323427750c (patch)
tree171149b6ed419f7e9fadf127a4641a4bd1ff8064 /SetFlags.cmake
parentFixed port command line argument. (#3287) (diff)
downloadcuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar.gz
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar.bz2
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar.lz
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar.xz
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.tar.zst
cuberite-9e52982f0e8ce1c99f48d51e38f843323427750c.zip
Diffstat (limited to '')
-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()