mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #1485 from equalsraf/tb-no-make-prg
Use cmake --build inside CMake scripts instead of calling Make directly
This commit is contained in:
commit
3b8661745b
@ -205,28 +205,6 @@ if(NOT BUSTED_OUTPUT_TYPE)
|
|||||||
set(BUSTED_OUTPUT_TYPE "utfTerminal")
|
set(BUSTED_OUTPUT_TYPE "utfTerminal")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Setup make.
|
|
||||||
find_program(MAKE_PRG NAMES gmake make)
|
|
||||||
if(MAKE_PRG)
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${MAKE_PRG}" --version
|
|
||||||
OUTPUT_VARIABLE MAKE_VERSION_INFO)
|
|
||||||
if(NOT "${OUTPUT_VARIABLE}" MATCHES ".*GNU.*")
|
|
||||||
unset(MAKE_PRG)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(NOT MAKE_PRG)
|
|
||||||
message(FATAL_ERROR "GNU Make is required to build the dependencies.")
|
|
||||||
else()
|
|
||||||
message(STATUS "Found GNU Make at ${MAKE_PRG}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# When using make, use the $(MAKE) variable to avoid warnings about the job
|
|
||||||
# server.
|
|
||||||
if(CMAKE_GENERATOR MATCHES "Makefiles")
|
|
||||||
set(MAKE_PRG "$(MAKE)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# CMake is painful here. It will create the destination using the user's
|
# CMake is painful here. It will create the destination using the user's
|
||||||
# current umask, and we don't want that. And we don't just want to install
|
# current umask, and we don't want that. And we don't just want to install
|
||||||
# the target directory, as it will mess with existing permissions. So this
|
# the target directory, as it will mess with existing permissions. So this
|
||||||
@ -251,15 +229,6 @@ endforeach()
|
|||||||
|
|
||||||
install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake)
|
install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/GenerateHelptags.cmake)
|
||||||
|
|
||||||
# Unfortunately, the below does not work under Ninja. Ninja doesn't use a
|
|
||||||
# pseudo-tty when launching processes, because it can put many jobs in parallel
|
|
||||||
# and eat-up all the available pseudo-ttys. Unfortunately, that doesn't work
|
|
||||||
# well with the legacy tests. I have a branch that converts them to run under
|
|
||||||
# CTest, but it needs a little more work.
|
|
||||||
# add_custom_target(test
|
|
||||||
# COMMAND ${MAKE_PRG} -C ${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir
|
|
||||||
# VIMPROG=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nvim)
|
|
||||||
|
|
||||||
# Go down the tree.
|
# Go down the tree.
|
||||||
|
|
||||||
add_subdirectory(src/nvim)
|
add_subdirectory(src/nvim)
|
||||||
|
3
third-party/CMakeLists.txt
vendored
3
third-party/CMakeLists.txt
vendored
@ -106,9 +106,8 @@ if(USE_BUNDLED_MSGPACK)
|
|||||||
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
||||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||||
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_COMPILER_ARG1} -fPIC"
|
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_COMPILER_ARG1} -fPIC"
|
||||||
BUILD_COMMAND ${MAKE_PRG}
|
BUILD_COMMAND ${CMAKE_COMMAND} --build .
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND}
|
INSTALL_COMMAND ${CMAKE_COMMAND}
|
||||||
-DMAKE_PRG=${MAKE_PRG}
|
|
||||||
-DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}msgpack*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
-DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}msgpack*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/InstallMsgpack.cmake)
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/InstallMsgpack.cmake)
|
||||||
list(APPEND THIRD_PARTY_DEPS msgpack)
|
list(APPEND THIRD_PARTY_DEPS msgpack)
|
||||||
|
2
third-party/cmake/InstallMsgpack.cmake
vendored
2
third-party/cmake/InstallMsgpack.cmake
vendored
@ -1,5 +1,5 @@
|
|||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${MAKE_PRG} install
|
COMMAND ${CMAKE_COMMAND} --build . --target install
|
||||||
RESULT_VARIABLE res)
|
RESULT_VARIABLE res)
|
||||||
|
|
||||||
if(NOT res EQUAL 0)
|
if(NOT res EQUAL 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user