Skip to content

Commit 5cc9f8c

Browse files
committedMar 6, 2025
Fix for setting the unittest root dir
1 parent ce9e7d5 commit 5cc9f8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ option(DEBUG_MOVE "Debug setting: Ensure std::move is being used" FALSE)
429429
option(VERIFY_VECTOR "Debug setting: verify vectors (options: dictionary_expression, dictionary_operator, constant_operator, sequence_operator, nested_shuffle)" "none")
430430
option(CLANG_TIDY "Enable build for clang-tidy, this disables all source files excluding the core database. This does not produce a working build." FALSE)
431431
option(BUILD_UNITTESTS "Build the unittest runner." TRUE)
432-
option(UNITTEST_ROOT_DIRECTORY "The unittest root directory (defaults to the project source directory)" FALSE)
433432
option(ENABLE_UNITTEST_CPP_TESTS "Build the C++ Unit Tests." TRUE)
434433
option(EXTENSION_CONFIG_BUILD "Produce extension configuration artifacts instead of building. (such as shared vcpkg.json, extensions.txt)" FALSE)
435434
option(CUSTOM_LINKER "Use a custom linker program" "")

‎test/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ if(NOT WIN32 AND NOT SUN)
3333
add_subdirectory(persistence)
3434
endif()
3535

36-
if(${UNITTEST_ROOT_DIRECTORY})
36+
set(UNITTEST_ROOT_DIRECTORY "" CACHE STRING "The unittest root directory (defaults to the project source directory)")
37+
if(DEFINED UNITTEST_ROOT_DIRECTORY AND NOT UNITTEST_ROOT_DIRECTORY STREQUAL "")
3738
add_definitions(-DDUCKDB_ROOT_DIRECTORY="${UNITTEST_ROOT_DIRECTORY}")
3839
else()
3940
add_definitions(-DDUCKDB_ROOT_DIRECTORY="${PROJECT_SOURCE_DIR}")

0 commit comments

Comments
 (0)