summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-13 19:19:59 +0100
committerMattes D <github@xoft.cz>2014-01-13 19:19:59 +0100
commit252def339de1e3184ba6ead1de6ac320e87700ba (patch)
tree0429bac694b5fb84181a316b304995139e1dba38 /CMakeLists.txt
parentcCreeper is no longer available in API. (diff)
parentAdded -march=native to linux targets (diff)
downloadcuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar.gz
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar.bz2
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar.lz
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar.xz
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.tar.zst
cuberite-252def339de1e3184ba6ead1de6ac320e87700ba.zip
Diffstat (limited to 'CMakeLists.txt')
-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)