aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-15 03:00:45 +0200
committerDaniel Hahler <git@thequod.de>2019-08-15 19:42:46 +0200
commit28219534ebd3dd998cb6e03714be89894e20be49 (patch)
tree9af73652c1a8b4382cde2089adad41b8da555b41
parent6261d2658fdff93a732b02d8fd6e386245968f2d (diff)
downloadrneovim-28219534ebd3dd998cb6e03714be89894e20be49.tar.gz
rneovim-28219534ebd3dd998cb6e03714be89894e20be49.tar.bz2
rneovim-28219534ebd3dd998cb6e03714be89894e20be49.zip
get_compile_flags: also look at target properties
-rw-r--r--cmake/GetCompileFlags.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/GetCompileFlags.cmake b/cmake/GetCompileFlags.cmake
index 482eacca16..667b97350c 100644
--- a/cmake/GetCompileFlags.cmake
+++ b/cmake/GetCompileFlags.cmake
@@ -13,6 +13,11 @@ function(get_compile_flags _compile_flags)
get_directory_property(compile_definitions
DIRECTORY "src/nvim"
COMPILE_DEFINITIONS)
+ get_target_property(compile_definitions_target nvim COMPILE_DEFINITIONS)
+ if(compile_definitions_target)
+ list(APPEND compile_definitions ${compile_definitions_target})
+ list(REMOVE_DUPLICATES compile_definitions)
+ endif()
# NOTE: list(JOIN) requires CMake 3.12, string(CONCAT) requires CMake 3.
string(REPLACE ";" " -D" compile_definitions "${compile_definitions}")
if(compile_definitions)
@@ -28,6 +33,11 @@ function(get_compile_flags _compile_flags)
get_directory_property(compile_options
DIRECTORY "src/nvim"
COMPILE_OPTIONS)
+ get_target_property(compile_options_target nvim COMPILE_OPTIONS)
+ if(compile_options_target)
+ list(APPEND compile_options ${compile_options_target})
+ list(REMOVE_DUPLICATES compile_options)
+ endif()
# NOTE: list(JOIN) requires CMake 3.12.
string(REPLACE ";" " " compile_options "${compile_options}")
string(REPLACE