-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (21 loc) · 897 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (21 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
cmake_minimum_required(VERSION 3.12)
project(cpp_fuzz_legacy LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.12.1
)
FetchContent_MakeAvailable(googletest)
add_library(math_utils src/math_utils.cpp)
target_include_directories(math_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable(math_utils_test test/math_utils_test.cpp)
target_link_libraries(math_utils_test gtest_main math_utils)
add_test(NAME math_utils_test COMMAND math_utils_test)
add_executable(fuzz_math_utils fuzz/fuzz_math_utils.cpp)
target_compile_options(fuzz_math_utils PRIVATE -fsanitize=fuzzer,address)
target_link_options(fuzz_math_utils PRIVATE -fsanitize=fuzzer,address)
target_link_libraries(fuzz_math_utils PRIVATE math_utils)