aboutsummaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
authorDaniel Hahler <github@thequod.de>2019-06-29 20:37:48 +0200
committerGitHub <noreply@github.com>2019-06-29 20:37:48 +0200
commitc207095445286321cbb319ab1498c34b204760cf (patch)
treec839456e97332255d1ced1607477083149a6df77 /third-party
parent39ba35b38da0724f8562e4e63258ca0c51890e1d (diff)
downloadrneovim-c207095445286321cbb319ab1498c34b204760cf.tar.gz
rneovim-c207095445286321cbb319ab1498c34b204760cf.tar.bz2
rneovim-c207095445286321cbb319ab1498c34b204760cf.zip
build: CMake: do not set CMP0059 to old (#10363)
Keeps using add_definitions for compatibility with older CMake. Newer CMake (3.12) would have `add_compile_definitions`, but it is not required, since `add_defitions` was meant to be used for compile/preprocessor definitions initially anyway. Ref: https://github.com/neovim/neovim/pull/4389
Diffstat (limited to 'third-party')
-rw-r--r--third-party/cmake/LibvtermCMakeLists.txt5
-rw-r--r--third-party/cmake/libtermkeyCMakeLists.txt2
2 files changed, 4 insertions, 3 deletions
diff --git a/third-party/cmake/LibvtermCMakeLists.txt b/third-party/cmake/LibvtermCMakeLists.txt
index dad3ef62c2..16c4d542c4 100644
--- a/third-party/cmake/LibvtermCMakeLists.txt
+++ b/third-party/cmake/LibvtermCMakeLists.txt
@@ -5,9 +5,10 @@ include(GNUInstallDirs)
find_package(Perl)
if(MSVC)
- add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
+ add_compile_options(/W3)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
else()
- add_definitions(-Wall -std=c99)
+ add_compile_options(-Wall -std=c99)
endif()
# Generate includes from tables
diff --git a/third-party/cmake/libtermkeyCMakeLists.txt b/third-party/cmake/libtermkeyCMakeLists.txt
index c55da7929a..af54c1daec 100644
--- a/third-party/cmake/libtermkeyCMakeLists.txt
+++ b/third-party/cmake/libtermkeyCMakeLists.txt
@@ -4,7 +4,7 @@ project(libtermkey)
add_definitions(-D _CRT_SECURE_NO_WARNINGS)
add_definitions(-DHAVE_UNIBILIUM)
if(NOT MSVC)
- add_definitions(-std=c99)
+ add_compile_options(-std=c99)
endif()
include_directories(${PROJECT_BINARY_DIR}/t)