aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-20 16:49:48 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-21 22:18:21 +0100
commit78239f0bbcb2527165fbaa3172b50c99c6092136 (patch)
tree7e02592f4731d2ff7dc58cdcb4defe2f6402b98b /CMakeLists.txt
parentb4fee208ef668c0dceebca12fe30c0f9d5cbf64d (diff)
downloadrneovim-78239f0bbcb2527165fbaa3172b50c99c6092136.tar.gz
rneovim-78239f0bbcb2527165fbaa3172b50c99c6092136.tar.bz2
rneovim-78239f0bbcb2527165fbaa3172b50c99c6092136.zip
build: reorganize cmake files
Also add _GNU_SOURCE compiler definition for all non MSVC compilers. Closes https://github.com/neovim/neovim/issues/26087.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d128ec6a8e..475a1a2c3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,10 @@ if(NOT CI_BUILD)
set(CMAKE_INSTALL_MESSAGE NEVER)
endif()
+if(${CMAKE_VERSION} VERSION_LESS 3.20)
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+endif()
+
# Prefer our bundled versions of dependencies.
if(DEFINED ENV{DEPS_BUILD_DIR})
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")