Spicy: Port over to Spicy's new tuple representation.

Includes a fix for supporting CMake 4.0.
This commit is contained in:
Robin Sommer 2025-03-20 11:08:43 +01:00
parent 71305b0009
commit 94ddd7f411
No known key found for this signature in database
GPG key ID: D8187293B3FFE5D0
9 changed files with 111 additions and 141 deletions

View file

@ -18,6 +18,22 @@ if (WIN32)
set(CMAKE_TOOLCHAIN_FILE ${_toolchain} CACHE STRING "Vcpkg toolchain file")
endif ()
if (APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL 4.0.0 AND NOT CMAKE_OSX_SYSROOT)
# Spicy needs having CMAKE_OSX_SYSROOT point to the macOS SDK
# path, but starting with CMake 4.0 CMAKE_OSX_SYSROOT is not set
# automatically anymore. So we follow the guidance from the CMake 4.0
# release notes here:
#
# Builds targeting macOS no longer choose any SDK or pass an "-isysroot"
# flag to the compiler by default. [...] users must now specify
# "-DCMAKE_OSX_SYSROOT=macosx" when configuring their build.
#
# Note that this needs to happen before the project() call below, meaning
# we cannot rely on the corresponding code inside the Spicy CMake
# configuration.
set(CMAKE_OSX_SYSROOT "macosx")
endif ()
project(Zeek C CXX)
# We want to set ENABLE_DEBUG to ON by default if the build type is Debug.