aboutsummaryrefslogtreecommitdiff
path: root/cmake.deps/cmake
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-10-10 23:18:45 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-10-16 20:15:41 +0200
commitb80a8e2c16b6d6eb16ac84232c27eb7cfa4a434a (patch)
treecc6137ccacac04ae6f9d7674bfe4fc1fbf9a5bcd /cmake.deps/cmake
parenta4c4b39d55db087af19a5ed8b6a1e5ecacb0c615 (diff)
downloadrneovim-b80a8e2c16b6d6eb16ac84232c27eb7cfa4a434a.tar.gz
rneovim-b80a8e2c16b6d6eb16ac84232c27eb7cfa4a434a.tar.bz2
rneovim-b80a8e2c16b6d6eb16ac84232c27eb7cfa4a434a.zip
build: adjust how find order is prioritized
Ensure bundled libraries and include directories are always searched first before any others. This will provide a more consistent experience as the search order of the builtin find_ functions can vary depending on system. This should make the build process faster when building with bundled deps as we limit the search to only the .deps directory. Separating the search between .deps and everything makes debugging find_-related problems simpler if you need to check how dependencies are found. For libraries, we divide the search process into the following order: 1. Only search in .deps directory and only search for static libraries. 2. Only search in .deps directory and search for all libraries. 3. Search everywhere and search for all libraries. Make an exception for FindLibintl.cmake as changing the search order seems to break some tests on macos.
Diffstat (limited to 'cmake.deps/cmake')
-rw-r--r--cmake.deps/cmake/BuildLuajit.cmake8
-rw-r--r--cmake.deps/cmake/RemoveFiles.cmake5
2 files changed, 0 insertions, 13 deletions
diff --git a/cmake.deps/cmake/BuildLuajit.cmake b/cmake.deps/cmake/BuildLuajit.cmake
index c0f9c1ab8e..e97d773c3c 100644
--- a/cmake.deps/cmake/BuildLuajit.cmake
+++ b/cmake.deps/cmake/BuildLuajit.cmake
@@ -141,11 +141,3 @@ elseif(MSVC)
else()
message(FATAL_ERROR "Trying to build luajit in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
endif()
-
-if (NOT MSVC)
- add_custom_target(clean_shared_libraries_luajit ALL
- COMMAND ${CMAKE_COMMAND}
- -D REMOVE_FILE_GLOB=${DEPS_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
- -P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake)
- add_dependencies(clean_shared_libraries_luajit luajit)
-endif()
diff --git a/cmake.deps/cmake/RemoveFiles.cmake b/cmake.deps/cmake/RemoveFiles.cmake
deleted file mode 100644
index 88e2bc70a6..0000000000
--- a/cmake.deps/cmake/RemoveFiles.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-file(GLOB_RECURSE FILES_TO_REMOVE ${REMOVE_FILE_GLOB})
-
-if(FILES_TO_REMOVE)
- file(REMOVE ${FILES_TO_REMOVE})
-endif()