From 6aa5346b04d6ffbac1ba8fc5626182c16b5ad947 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 6 Mar 2023 22:36:04 +0100 Subject: [PATCH] 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. --- src/nvim/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 51e0727cd5..f3344c10de 100755 --- 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 $<$:${UNIT_TEST_FIXTURES}>) - target_compile_definitions(nvim PRIVATE $<$:UNIT_TESTING>) + target_sources(nvim PRIVATE ${UNIT_TEST_FIXTURES}) + target_compile_definitions(nvim PRIVATE UNIT_TESTING) endif() target_sources(main_lib INTERFACE