-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
37 lines (30 loc) · 1.04 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
# CMakeLists files in this project can
# refer to the root source directory of the project as ${MAIN_SOURCE_DIR} and
# to the root binary directory of the project as ${MAIN_BINARY_DIR}.
cmake_minimum_required(VERSION 3.5)
# https://cmake.org/cmake/help/v3.0/command/project.html
project(h264nal VERSION 0.18)
# std::make_ptr requires C++14
set(CMAKE_CXX_STANDARD 14)
# set up clang-tidy
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-format-style='google'")
if(WIN32)
# Designated initializers throughout project requires C++20 on windows
set(CMAKE_CXX_STANDARD 20)
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
enable_testing()
# Recurse into source code subdirectories.
add_subdirectory(src)
add_subdirectory(tools)
add_subdirectory(test)
option(BUILD_CLANG_FUZZER "Build clang fuzzer sanitizer targets" ON)
if(BUILD_CLANG_FUZZER)
add_subdirectory(fuzz)
endif()