Skip to content

Commit a10b16a

Browse files
committed
initial commit
0 parents  commit a10b16a

File tree

17 files changed

+1837
-0
lines changed

17 files changed

+1837
-0
lines changed

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build

.vscode/c_cpp_properties.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${default}"
7+
],
8+
"compilerPath": "/usr/local/bin/gcc-11",
9+
"cStandard": "gnu17",
10+
"cppStandard": "c++20",
11+
"intelliSenseMode": "macos-gcc-x64",
12+
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
13+
"configurationProvider": "ms-vscode.cmake-tools"
14+
}
15+
],
16+
"version": 4
17+
}

.vscode/settings.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"files.associations": {
3+
"array": "cpp",
4+
"atomic": "cpp",
5+
"bit": "cpp",
6+
"*.tcc": "cpp",
7+
"cctype": "cpp",
8+
"clocale": "cpp",
9+
"cmath": "cpp",
10+
"compare": "cpp",
11+
"complex": "cpp",
12+
"concepts": "cpp",
13+
"cstdarg": "cpp",
14+
"cstddef": "cpp",
15+
"cstdint": "cpp",
16+
"cstdio": "cpp",
17+
"cstdlib": "cpp",
18+
"cwchar": "cpp",
19+
"cwctype": "cpp",
20+
"deque": "cpp",
21+
"string": "cpp",
22+
"unordered_map": "cpp",
23+
"vector": "cpp",
24+
"exception": "cpp",
25+
"algorithm": "cpp",
26+
"functional": "cpp",
27+
"iterator": "cpp",
28+
"memory": "cpp",
29+
"memory_resource": "cpp",
30+
"numeric": "cpp",
31+
"random": "cpp",
32+
"string_view": "cpp",
33+
"system_error": "cpp",
34+
"tuple": "cpp",
35+
"type_traits": "cpp",
36+
"utility": "cpp",
37+
"initializer_list": "cpp",
38+
"iosfwd": "cpp",
39+
"iostream": "cpp",
40+
"istream": "cpp",
41+
"limits": "cpp",
42+
"new": "cpp",
43+
"numbers": "cpp",
44+
"ostream": "cpp",
45+
"sstream": "cpp",
46+
"stdexcept": "cpp",
47+
"streambuf": "cpp",
48+
"typeinfo": "cpp",
49+
"format": "cpp",
50+
"chrono": "cpp",
51+
"cstring": "cpp",
52+
"ctime": "cpp",
53+
"forward_list": "cpp",
54+
"map": "cpp",
55+
"ratio": "cpp",
56+
"cinttypes": "cpp",
57+
"valarray": "cpp",
58+
"optional": "cpp",
59+
"ranges": "cpp"
60+
},
61+
"cSpell.words": [
62+
"constexpr",
63+
"cout",
64+
"endl",
65+
"fullname",
66+
"gson",
67+
"nlohmann",
68+
"noexcept",
69+
"ostream",
70+
"println",
71+
"struct"
72+
]
73+
}

CMakeLists.txt

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright 2021 CppCon, Inc. Subject to Apache-2.0 License.
2+
3+
cmake_minimum_required(VERSION 3.14...3.21 FATAL_ERROR)
4+
5+
set(CPPCON_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
6+
set(CPPCON_TARGET_MAIN cppcon)
7+
8+
set(CMAKE_CXX_EXTENSIONS OFF)
9+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
10+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
11+
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
12+
set(CONAN_CMAKE_SILENT_OUTPUT ON)
13+
14+
project(CppCon VERSION 2021.0.0 LANGUAGES CXX)
15+
16+
if (NOT DEFINED CMAKE_CXX_STANDARD)
17+
set(CMAKE_CXX_STANDARD 20)
18+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
19+
endif()
20+
21+
if (NOT DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
22+
set(CMAKE_BUILD_TYPE Release)
23+
endif()
24+
25+
if (NOT DEFINED CMAKE_DEBUG_POSTFIX)
26+
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Default postfix for libraries with debug build type")
27+
endif()
28+
29+
if (NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
30+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
31+
endif()
32+
33+
if (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
34+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
35+
endif()
36+
37+
if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
38+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
39+
endif()
40+
41+
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
42+
43+
add_library(cppcon_project_options INTERFACE)
44+
45+
if(CMAKE_GENERATOR STREQUAL "Ninja")
46+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
47+
target_compile_options(cppcon_project_options INTERFACE -fcolor-diagnostics)
48+
endif()
49+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
50+
target_compile_options(cppcon_project_options INTERFACE -fdiagnostics-color=always)
51+
endif()
52+
endif()
53+
54+
if (cppcon_BUILD_TESTS)
55+
if (MSVC)
56+
target_compile_options(cppcon_project_options INTERFACE /W4 /wd4251)
57+
else()
58+
target_compile_options(cppcon_project_options INTERFACE -Wextra -Werror -Wfatal-errors)
59+
target_compile_options(cppcon_project_options INTERFACE -Wall -pedantic)
60+
endif()
61+
endif()
62+
63+
message(DEBUG "CppCon: building version: ${cppcon_VERSION}")
64+
message(DEBUG "CppCon: using cxx standard: ${CMAKE_CXX_STANDARD}")
65+
message(DEBUG "CppCon: using build type: ${CMAKE_BUILD_TYPE}")
66+
67+
include(external.cmake)
68+
69+
add_subdirectory(src)
70+
add_subdirectory(app)

0 commit comments

Comments
 (0)