-
Notifications
You must be signed in to change notification settings - Fork 361
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
25 lines (22 loc) · 813 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
25 lines (22 loc) · 813 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
cmake_minimum_required(VERSION 3.15)
project(Algorithms)
enable_testing()
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
if (MSVC)
# needs at least cmake 3.15
add_compile_options(/W4 /WX)
else()
add_compile_options(-Wall -Wextra -Werror -Wpedantic -Wno-gnu-empty-struct -Wno-unused-parameter -ftrapv)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-fsanitize=address,undefined)
add_link_options(-fsanitize=address,undefined)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fsanitize=address,undefined,leak)
add_link_options(-fsanitize=address,undefined,leak)
endif()
endif()
add_subdirectory(LibraryC)
add_subdirectory(LibraryCPP)
add_subdirectory(LibraryCPPClass)
add_subdirectory(LibraryCPPTemplate)
add_subdirectory(Lab1C)