summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-13 19:13:09 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-13 19:13:09 +0100
commit9c669e92179c227301d9bfcb4ae20bc848c4b687 (patch)
tree0429bac694b5fb84181a316b304995139e1dba38
parentcCreeper is no longer available in API. (diff)
downloadcuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar.gz
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar.bz2
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar.lz
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar.xz
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.tar.zst
cuberite-9c669e92179c227301d9bfcb4ae20bc848c4b687.zip
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 416290df1..768b334ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,12 +46,17 @@ else()
add_flags_cxx("-pthread")
endif()
-# Allow for a forced 32-bit build under 32-bit OS:
+# Allow for a forced 32-bit build under 64-bit OS:
if (FORCE_32)
add_flags_cxx("-m32")
add_flags_lnk("-m32")
endif()
+#have the compiler generate code spercificly targeted at the current machine on Linux
+if(LINUX AND NOT CROSSCOMPILE)
+ add_flags_cxx("-march=native")
+endif()
+
# Set lower warnings-level for the libraries:
if (MSVC)
# Remove /W3 from command line -- cannot just cancel it later with /w like in unix, MSVC produces a D9025 warning (option1 overriden by option2)