mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
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
This commit is contained in:
5
third-party/cmake/LibvtermCMakeLists.txt
vendored
5
third-party/cmake/LibvtermCMakeLists.txt
vendored
@@ -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
|
||||
|
||||
2
third-party/cmake/libtermkeyCMakeLists.txt
vendored
2
third-party/cmake/libtermkeyCMakeLists.txt
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user