aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorthomasvaughan <thomas@vaughan.net>2018-09-02 14:51:23 +0000
committerthomasvaughan <thomas@vaughan.net>2018-09-11 14:32:33 +0000
commitbcda7adcd444cc72b5c0d02da65be6b5cd843fc2 (patch)
tree0a02c0b8c9ea34c32ced30e511338db0ca479e52 /CMakeLists.txt
parentMerge pull request #4223 (diff)
downloadmonero-bcda7adcd444cc72b5c0d02da65be6b5cd843fc2.tar.xz
NetBSD support
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cab853581..20af7e07a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -502,6 +502,17 @@ else()
set(ARCH_FLAG "-march=armv8")
else()
set(ARCH_FLAG "-march=${ARCH}")
+ if(ARCH STREQUAL "native")
+ check_c_compiler_flag(-march=native CC_SUPPORTS_MARCH_NATIVE)
+ if (NOT CC_SUPPORTS_MARCH_NATIVE)
+ check_c_compiler_flag(-mtune=native CC_SUPPORTS_MTUNE_NATIVE)
+ if (CC_SUPPORTS_MTUNE_NATIVE)
+ set(ARCH_FLAG "-mtune=${ARCH}")
+ else()
+ set(ARCH_FLAG "")
+ endif()
+ endif()
+ endif()
endif()
set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
if(NOT MINGW)