aboutsummaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
authorb-r-o-c-k <brockmammen@gmail.com>2018-03-01 22:56:59 -0600
committerGitHub <noreply@github.com>2018-03-01 22:56:59 -0600
commitde3a833ec73cda093df918b8b079df116c42f91c (patch)
treef9063874a476ca3a09a0321996a92db741ad47d0 /third-party
parentadfad73d8eb868b7b4691319c1f586f601f6815f (diff)
parent3d2f4154b1d5d0bb063951c830e009505bdce359 (diff)
downloadrneovim-de3a833ec73cda093df918b8b079df116c42f91c.tar.gz
rneovim-de3a833ec73cda093df918b8b079df116c42f91c.tar.bz2
rneovim-de3a833ec73cda093df918b8b079df116c42f91c.zip
Merge branch 'master' into msvc-compat
Diffstat (limited to 'third-party')
-rw-r--r--third-party/CMakeLists.txt10
-rw-r--r--third-party/cmake/BuildLibtermkey.cmake1
-rw-r--r--third-party/cmake/BuildLibvterm.cmake7
3 files changed, 15 insertions, 3 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index ceebb4cf1d..c523ecea00 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -2,6 +2,9 @@
cmake_minimum_required (VERSION 2.8.7)
project(NVIM_DEPS)
+# Needed for: check_c_compiler_flag()
+include(CheckCCompilerFlag)
+
# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
@@ -11,6 +14,13 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
+set(DEFAULT_MAKE_CFLAGS CFLAGS+=-g)
+
+check_c_compiler_flag(-Og HAS_OG_FLAG)
+if(HAS_OG_FLAG)
+ set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS})
+endif()
+
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr" CACHE PATH "Dependencies install directory.")
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.")
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.")
diff --git a/third-party/cmake/BuildLibtermkey.cmake b/third-party/cmake/BuildLibtermkey.cmake
index 9081e5e988..6692f16f13 100644
--- a/third-party/cmake/BuildLibtermkey.cmake
+++ b/third-party/cmake/BuildLibtermkey.cmake
@@ -43,6 +43,7 @@ ExternalProject_Add(libtermkey
PREFIX=${DEPS_INSTALL_DIR}
PKG_CONFIG_PATH=${DEPS_LIB_DIR}/pkgconfig
CFLAGS=-fPIC
+ ${DEFAULT_MAKE_CFLAGS}
install)
endif()
diff --git a/third-party/cmake/BuildLibvterm.cmake b/third-party/cmake/BuildLibvterm.cmake
index 1b95007cf2..5fb077e972 100644
--- a/third-party/cmake/BuildLibvterm.cmake
+++ b/third-party/cmake/BuildLibvterm.cmake
@@ -53,9 +53,10 @@ if(WIN32)
set(LIBVTERM_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE})
else()
set(LIBVTERM_INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
- PREFIX=${DEPS_INSTALL_DIR}
- CFLAGS=-fPIC
- install)
+ PREFIX=${DEPS_INSTALL_DIR}
+ CFLAGS=-fPIC
+ ${DEFAULT_MAKE_CFLAGS}
+ install)
endif()
BuildLibvterm(PATCH_COMMAND ${LIBVTERM_PATCH_COMMAND}