Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/pkg
Path: blob/main/external/libder/CMakeLists.txt
2066 views
1
cmake_minimum_required(VERSION 3.18)
2
3
project(libder)
4
5
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
6
add_compile_options(-fsanitize=address,undefined -fstrict-aliasing)
7
add_link_options(-fsanitize=address,undefined -fstrict-aliasing)
8
endif()
9
10
# AppleClang is excluded for the time being; the version used in GitHub Action
11
# runners doesn't seem to have that part of libclang_rt installed, though the
12
# -fsanitize=fuzzer-no-link instrumentation seems to be fine. Maybe re-evaluate
13
# this for MATCHES as a possibility later.
14
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
15
set(BUILD_FUZZERS TRUE
16
CACHE BOOL "Build the libFuzzer fuzzers (needs llvm)")
17
else()
18
set(BUILD_FUZZERS FALSE
19
CACHE BOOL "Build the libFuzzer fuzzers (needs llvm)")
20
endif()
21
22
add_subdirectory(libder)
23
add_subdirectory(derdump)
24
add_subdirectory(tests)
25
26