new ci scripts and presets

This commit is contained in:
BlackMATov
2022-12-29 01:16:54 +07:00
parent ce142df971
commit a21a6bd4ca
59 changed files with 650 additions and 7459 deletions

View File

@@ -1,5 +1,4 @@
# 3.8 version is required for `cxx_std_17`
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
if(NOT DEFINED PROJECT_NAME)
set(BUILD_AS_STANDALONE ON)
@@ -10,27 +9,28 @@ endif()
project(flat.hpp)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE headers)
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17)
target_include_directories(${PROJECT_NAME} INTERFACE headers)
target_compile_options(${PROJECT_NAME}
INTERFACE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
-Wno-c++98-compat-pedantic
-Wno-padded
-Wno-shadow
-Wno-unknown-warning-option>)
#
# BUILD_AS_STANDALONE
#
if(BUILD_AS_STANDALONE)
option(BUILD_WITH_UNBENCH "Build with benchmarks" OFF)
if(BUILD_WITH_UNBENCH)
enable_testing()
add_subdirectory(unbench)
endif()
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
if(BUILD_WITH_UNTESTS)
enable_testing()
add_subdirectory(untests)
endif()
if(NOT ${BUILD_AS_STANDALONE})
return()
endif()
option(BUILD_WITH_COVERAGE "Build with coverage" OFF)
option(BUILD_WITH_SANITIZERS "Build with sanitizers" OFF)
enable_testing()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(EnableASan)
include(EnableGCov)
include(EnableUBSan)
add_subdirectory(vendors)
add_subdirectory(untests)