forked from intel/cpp-std-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (32 loc) · 1.01 KB
/
CMakeLists.txt
File metadata and controls
38 lines (32 loc) · 1.01 KB
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
cmake_minimum_required(VERSION 3.21)
project(
stdx
VERSION 0.1.0
LANGUAGES CXX
DESCRIPTION "A header-only C++ library that polyfills the standard library."
)
include(cmake/get_cpm.cmake)
if(PROJECT_IS_TOP_LEVEL)
cpmaddpackage("gh:intel/cicd-repo-infrastructure#dev")
else()
cpmaddpackage("gh:intel/cicd-repo-infrastructure#3e2bef0")
endif()
add_versioned_package("gh:boostorg/mp11#boost-1.83.0")
fmt_recipe(11.0.0)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()
add_library(stdx INTERFACE)
target_include_directories(stdx INTERFACE include)
target_compile_features(stdx INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
target_compile_options(
stdx
INTERFACE
$<$<CXX_COMPILER_ID:Clang>:-Wno-gnu-string-literal-operator-template>
$<$<CXX_COMPILER_ID:Clang>:-Wno-missing-braces>)
target_link_libraries_system(stdx INTERFACE boost_mp11 fmt::fmt-header-only)
if(PROJECT_IS_TOP_LEVEL)
add_docs(docs)
add_subdirectory(test)
clang_tidy_interface(stdx)
endif()