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