summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-06-23 14:59:01 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-06-25 11:17:53 +0200
commitecc8ffbd8033724b026f10ab435f7054c37f145d (patch)
treeeca7a05f97353caa98bb4325ce10aa0882cb0eb4 /SetFlags.cmake
parentCompile with 4 threads on Jenkins builds, the build slaves were upgraded (diff)
downloadcuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar.gz
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar.bz2
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar.lz
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar.xz
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.tar.zst
cuberite-ecc8ffbd8033724b026f10ab435f7054c37f145d.zip
Diffstat (limited to 'SetFlags.cmake')
-rw-r--r--SetFlags.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index d3a7801ee..869307d91 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -88,6 +88,11 @@ function(set_global_flags)
# Make build use Unicode:
add_compile_definitions(UNICODE _UNICODE)
+
+ # Turn off CRT warnings:
+ add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
+
+ return ()
endif()
# Allow for a forced 32-bit build under 64-bit OS:
@@ -99,7 +104,7 @@ function(set_global_flags)
# https://en.wikipedia.org/wiki/Uname
# https://gcc.gnu.org/onlinedocs/gcc/index.html
# Have the compiler generate code specifically targeted at the current machine on Linux:
- if(UNIX AND NOT NO_NATIVE_OPTIMIZATION AND NOT CMAKE_CROSSCOMPILING)
+ if(NOT NO_NATIVE_OPTIMIZATION AND NOT CMAKE_CROSSCOMPILING)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} SYSTEM_PROCESSOR)
if (SYSTEM_PROCESSOR MATCHES "^(i386|i686|x86|amd64|mips)")
message(STATUS "Optimising for this machine (march=native)")