aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2020-02-17 18:04:01 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-02-23 09:49:33 +0100
commit0504f2f88dac9a4cf1fe1052a1e00ab203e9cf8e (patch)
treeebd48a8700761dca5576ce8cd7037c15110e3177
parent823b2104c3e579e8c3db8baab263dca0aa9d48bc (diff)
downloadrneovim-0504f2f88dac9a4cf1fe1052a1e00ab203e9cf8e.tar.gz
rneovim-0504f2f88dac9a4cf1fe1052a1e00ab203e9cf8e.tar.bz2
rneovim-0504f2f88dac9a4cf1fe1052a1e00ab203e9cf8e.zip
cmake: Check for -fno-common and use it if available
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de530bb4f7..74e161d989 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -308,6 +308,11 @@ if(UNIX)
endif()
endif()
+check_c_compiler_flag(-fno-common HAVE_FNO_COMMON)
+if (HAVE_FNO_COMMON)
+ add_compile_options(-fno-common)
+endif()
+
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
if(HAS_DIAG_COLOR_FLAG)
if(CMAKE_GENERATOR MATCHES "Ninja")