mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix default build with --disable-cpp-tests
.
For a build configured with `--disable-cpp-tests` we globally set `-DDOCTEST_CONFIG_DISABLE`. Spicy does not expect this define to be used and its unit tests fail to build with it. This patch adds a Zeek-side workaround for that. We now do not build the Spicy unit test targets as part of `ALL` anymore. Closes #2238.
This commit is contained in:
parent
d957f883df
commit
b13f8f4dd4
1 changed files with 16 additions and 0 deletions
|
@ -36,3 +36,19 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla")
|
|||
set(HILTI_DEV_PRECOMPILE_HEADERS OFF)
|
||||
|
||||
add_subdirectory(spicy)
|
||||
|
||||
# Disable Spicy unit test targets.
|
||||
#
|
||||
# Spicy builds its unit tests as part of `ALL`. They are usually not only
|
||||
# uninteresting for us but might cause problems. Since any configuration
|
||||
# we do for our unit tests happens through global C++ compiler flags, they
|
||||
# would get inherited directly by Spicy which can cause issues, e.g., we set
|
||||
# `-DDOCTEST_CONFIG_DISABLE` if `ENABLE_ZEEK_UNIT_TESTS` is false, but Spicy
|
||||
# unit test do not anticipate this define being set.
|
||||
set_target_properties(
|
||||
hilti-rt-tests
|
||||
hilti-rt-configuration-tests
|
||||
spicy-rt-tests
|
||||
hilti-toolchain-tests
|
||||
spicy-toolchain-tests
|
||||
PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue