-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
49 lines (42 loc) · 1.33 KB
/
CMakeLists.txt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.13)
project(LibMetaTesting)
set(CMAKE_CXX_STANDARD 17)
if (${CMAKE_BUILD_TYPE} EQUAL Debug)
add_compile_definitions(DEBUG)
endif()
set(INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
set(LIB_DIR ${PROJECT_SOURCE_DIR}/libs)
set(SRC_DIR ${PROJECT_SOURCE_DIR}/src)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
cmake_policy(SET CMP0077 NEW)
set(BUILD_SHARED_LIBS ON)
#set(YAML_BUILD_SHARED_LIBS ON)
add_subdirectory("./third_party/fmt")
add_subdirectory("./third_party/yaml-cpp")
add_subdirectory("./third_party/random")
include_directories("${INCLUDE_DIR}")
link_directories("${LIB_DIR}")
link_directories("/usr/local_lib")
add_library(metalib_fuzz SHARED
${SRC_DIR}/api_fuzz_rand_gen.cpp
${SRC_DIR}/api_elements.cpp
${SRC_DIR}/api_fuzzer.cpp
${SRC_DIR}/set_meta_tester.cpp
${SRC_DIR}/clang_interface.cpp
${SRC_DIR}/test_emitter.cpp
)
target_link_libraries(metalib_fuzz fmt)
target_link_libraries(metalib_fuzz yaml-cpp)
target_link_libraries(metalib_fuzz effolkronium_random)
if (METALIB_LIB_ONLY)
return()
endif()
add_executable(test_emitter
${SRC_DIR}/api_fuzz_rand_gen.cpp
${SRC_DIR}/api_elements.cpp
${SRC_DIR}/api_fuzzer.cpp
${SRC_DIR}/set_meta_tester.cpp
${SRC_DIR}/test_emitter.cpp
)
target_link_libraries(test_emitter fmt)
target_link_libraries(test_emitter yaml-cpp)