mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 20:38:18 +00:00
Don't require busted.
Only provide the unittest target if busted was found. And only build nvim-test if the unittest target exists by excluding nvim-test from all. Note: this means nvim-test won't be built by default, but it will be built when you try to run unittests.
This commit is contained in:
@@ -88,6 +88,7 @@ if(NOT BUSTED_OUTPUT_TYPE)
|
||||
set(BUSTED_OUTPUT_TYPE "utf_terminal")
|
||||
endif()
|
||||
|
||||
if(BUSTED_PRG)
|
||||
get_target_property(NVIM_TEST_LIB nvim-test LOCATION)
|
||||
add_custom_target(unittest
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@@ -100,6 +101,7 @@ add_custom_target(unittest
|
||||
-DTEST_INCLUDES=${CMAKE_BINARY_DIR}/test/includes/post
|
||||
-P ${CMAKE_MODULE_PATH}/RunUnittests.cmake
|
||||
DEPENDS nvim-test unittest-headers)
|
||||
endif()
|
||||
|
||||
# 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
|
||||
|
@@ -55,7 +55,7 @@ if(NOT DEFINED ENV{SKIP_EXEC})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ENV{SKIP_UNITTEST})
|
||||
add_library(nvim-test MODULE ${NEOVIM_SOURCES} ${OS_SOURCES})
|
||||
add_library(nvim-test MODULE EXCLUDE_FROM_ALL ${NEOVIM_SOURCES} ${OS_SOURCES})
|
||||
target_link_libraries(nvim-test ${NVIM_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user