diff options
author | dundargoc <gocdundar@gmail.com> | 2024-01-19 13:21:25 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-01-20 12:59:27 +0100 |
commit | f936a962d04f9937946018cc1386f20bda6fc1de (patch) | |
tree | d9830f132b1ee1de25ad8032b183a500a9baaeeb /test | |
parent | ed103cde28dd6aeb8d240240309c26d3f20060f4 (diff) | |
download | rneovim-f936a962d04f9937946018cc1386f20bda6fc1de.tar.gz rneovim-f936a962d04f9937946018cc1386f20bda6fc1de.tar.bz2 rneovim-f936a962d04f9937946018cc1386f20bda6fc1de.zip |
build: create separate targets for nvim with and without runtime files
This distinction is important for correct dependency management, as the
nvim binary is used to create some runtime files. The nvim binary (and
the target to build it) is thus called `nvim_bin` and the target to
build all of nvim (binary+runtime) is called `nvim`.
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 14 | ||||
-rw-r--r-- | test/functional/fixtures/CMakeLists.txt | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index da2c29010b..3ae11bd1a7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,7 +7,7 @@ set(TEST_OPTIONS -D CIRRUS_CI=$ENV{CIRRUS_CI} -D CI_BUILD=${CI_BUILD} -D DEPS_INSTALL_DIR=${DEPS_INSTALL_DIR} - -D NVIM_PRG=$<TARGET_FILE:nvim> + -D NVIM_PRG=$<TARGET_FILE:nvim_bin> -D TEST_DIR=${CMAKE_CURRENT_SOURCE_DIR} -D WORKING_DIR=${PROJECT_SOURCE_DIR}) @@ -18,9 +18,8 @@ if(LUA_HAS_FFI) -D TEST_TYPE=unit ${TEST_OPTIONS} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim USES_TERMINAL) - add_dependencies(unittest lua-dev-deps) + add_dependencies(unittest lua-dev-deps nvim) else() message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}") endif() @@ -34,16 +33,15 @@ add_custom_target(functionaltest -D TEST_TYPE=functional ${TEST_OPTIONS} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim printenv-test printargs-test shell-test pwsh-test streams-test tty-test ${GENERATED_HELP_TAGS} ${GENERATED_SYN_VIM} + DEPENDS printenv-test printargs-test shell-test pwsh-test streams-test tty-test USES_TERMINAL) +add_dependencies(functionaltest lua-dev-deps nvim) add_custom_target(benchmark COMMAND ${CMAKE_COMMAND} -D TEST_TYPE=benchmark ${TEST_OPTIONS} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim tty-test + DEPENDS tty-test USES_TERMINAL) - -add_dependencies(functionaltest lua-dev-deps) -add_dependencies(benchmark lua-dev-deps) +add_dependencies(benchmark lua-dev-deps nvim) diff --git a/test/functional/fixtures/CMakeLists.txt b/test/functional/fixtures/CMakeLists.txt index 6e64b1e4dc..150407fe46 100644 --- a/test/functional/fixtures/CMakeLists.txt +++ b/test/functional/fixtures/CMakeLists.txt @@ -5,7 +5,7 @@ endif() if(WIN32) target_compile_definitions(test_lib INTERFACE MSWIN) endif() -target_link_libraries(test_lib INTERFACE nvim) +target_link_libraries(test_lib INTERFACE nvim_bin) add_executable(tty-test EXCLUDE_FROM_ALL tty-test.c) add_executable(shell-test EXCLUDE_FROM_ALL shell-test.c) |