commit 6aa5346b04d6ffbac1ba8fc5626182c16b5ad947
parent 1cc23e1109ed88275df5c986c352f73b99a0301c
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date: Mon, 6 Mar 2023 22:36:04 +0100
build: enable unit testing on release builds (#22554)
Unittests not working on release builds can lead to confusing
situations, such as contributors wondering why their tests aren't
working if they forgot they've built with a release build. This only
increased the Release executable size by 8 kB on my personal machine,
which is an acceptable tradeoff.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
@@ -626,8 +626,8 @@ if(PREFER_LUA)
message(STATUS "luajit not used, skipping unit tests")
else()
glob_wrapper(UNIT_TEST_FIXTURES ${PROJECT_SOURCE_DIR}/test/unit/fixtures/*.c)
- target_sources(nvim PRIVATE $<$<CONFIG:Debug>:${UNIT_TEST_FIXTURES}>)
- target_compile_definitions(nvim PRIVATE $<$<CONFIG:Debug>:UNIT_TESTING>)
+ target_sources(nvim PRIVATE ${UNIT_TEST_FIXTURES})
+ target_compile_definitions(nvim PRIVATE UNIT_TESTING)
endif()
target_sources(main_lib INTERFACE