diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-15 22:06:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 22:06:56 +0200 |
commit | 1852dfdf9aede9f3f8bc670e39c5830c644a9bbc (patch) | |
tree | 5f5c02d1386141c0607874156bd466a1575296e7 /cmake/GetCompileFlags.cmake | |
parent | abfc8b3257f8dd945bfb458d94b5981a6e322861 (diff) | |
parent | 18fb4dcbf97a5b1d7b1fa90ff341ea29134b48ec (diff) | |
download | rneovim-1852dfdf9aede9f3f8bc670e39c5830c644a9bbc.tar.gz rneovim-1852dfdf9aede9f3f8bc670e39c5830c644a9bbc.tar.bz2 rneovim-1852dfdf9aede9f3f8bc670e39c5830c644a9bbc.zip |
Merge pull request #10784 from blueyed/improve-version-compile-flags
Improve compile options/definitions with sanitizer builds (for --version).
Diffstat (limited to 'cmake/GetCompileFlags.cmake')
-rw-r--r-- | cmake/GetCompileFlags.cmake | 10 |
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 |