aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-10-26 22:30:00 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-04 18:32:47 +0100
commit5cefec7349610853910c21a0215f85a4d47132d1 (patch)
treec2970e83c0016870fe5ca853bb86837f24ecc7ab /src/nvim
parentec66a95fbc9069a3122838dd3f904582b248691c (diff)
downloadrneovim-5cefec7349610853910c21a0215f85a4d47132d1.tar.gz
rneovim-5cefec7349610853910c21a0215f85a4d47132d1.tar.bz2
rneovim-5cefec7349610853910c21a0215f85a4d47132d1.zip
build: various cmake fixes
- silence false warnings on MSVC - merge `clang-tidy` cmake target into `lintc` and remove the corresponding make target - use cmake's built-in endianness detection
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/CMakeLists.txt11
-rw-r--r--src/nvim/types.h6
2 files changed, 6 insertions, 11 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 12614ef60a..85e12d66de 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -7,7 +7,8 @@ if(TARGET libuv::uv_a)
target_link_libraries(libuv INTERFACE libuv::uv_a)
mark_as_advanced(libuv_DIR)
else()
- # Fall back to find module for older libuv versions that don't provide config file
+ # Fall back to find module for libuv versions older than v1.45.0 which don't
+ # provide a config file
find_package(Libuv 1.28.0 REQUIRED MODULE)
target_include_directories(libuv SYSTEM BEFORE INTERFACE ${LIBUV_INCLUDE_DIR})
target_link_libraries(libuv INTERFACE ${LIBUV_LIBRARIES})
@@ -90,7 +91,7 @@ if(MSVC)
target_compile_options(main_lib INTERFACE -W3)
# Disable warnings that give too many false positives.
- target_compile_options(main_lib INTERFACE -wd4311 -wd4146 -wd4003 -wd4715)
+ target_compile_options(main_lib INTERFACE -wd4311 -wd4146 -wd4003 -wd4715 -wd4003)
target_compile_definitions(main_lib INTERFACE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE)
target_sources(main_lib INTERFACE ${CMAKE_CURRENT_LIST_DIR}/os/nvim.manifest)
@@ -812,7 +813,7 @@ else()
os/os_win_console.h)
endif()
add_glob_target(
- TARGET clang-tidy
+ TARGET lintc-clang-tidy
COMMAND ${CLANG_TIDY_PRG}
FILES ${NVIM_SOURCES} ${NVIM_HEADERS}
FLAGS --quiet
@@ -841,7 +842,7 @@ add_glob_target(
add_custom_target(copy_compile_commands
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/compile_commands.json ${PROJECT_SOURCE_DIR}/compile_commands.json)
add_dependencies(copy_compile_commands nvim)
-add_dependencies(clang-tidy copy_compile_commands)
+add_dependencies(lintc-clang-tidy copy_compile_commands)
add_dependencies(clang-analyzer copy_compile_commands)
if(CI_BUILD)
@@ -866,7 +867,7 @@ add_glob_target(
add_dependencies(lintc-uncrustify uncrustify)
add_custom_target(lintc)
-add_dependencies(lintc lintc-clint lintc-uncrustify)
+add_dependencies(lintc lintc-clint lintc-uncrustify lintc-clang-tidy)
add_custom_target(formatc
COMMAND ${CMAKE_COMMAND}
diff --git a/src/nvim/types.h b/src/nvim/types.h
index 86ef64a9a9..96034d13af 100644
--- a/src/nvim/types.h
+++ b/src/nvim/types.h
@@ -46,12 +46,6 @@ typedef enum {
typedef struct Decoration Decoration;
-#ifndef ORDER_BIG_ENDIAN
-# if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-# define ORDER_BIG_ENDIAN
-# endif
-#endif
-
typedef int64_t OptInt;
#endif // NVIM_TYPES_H