File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ Language : Cpp
3+ BasedOnStyle : LLVM
4+ AlwaysBreakTemplateDeclarations : Yes
5+ BreakBeforeBraces : Attach
6+ ColumnLimit : 120
7+ SpaceAfterTemplateKeyword : true
8+ Standard : c++20
9+ TabWidth : 4
10+ IndentWidth : 4
11+ UseTab : Always
12+ AllowShortEnumsOnASingleLine : true
13+ AllowShortCaseLabelsOnASingleLine : true
14+ AllowShortFunctionsOnASingleLine : All
15+ AllowShortLambdasOnASingleLine : All
16+ AllowShortBlocksOnASingleLine : Always
17+ AllowShortIfStatementsOnASingleLine : Always
18+ IncludeCategories :
19+ # Headers in <> without extension.
20+ - Regex : ' <([A-Za-z0-9\/-_])+>'
21+ Priority : 1
22+ # Headers in <> with .h extension.
23+ - Regex : ' <([A-Za-z0-9\/-_])+\.h>'
24+ Priority : 10
25+ # Headers in <> with .hpp extension.
26+ - Regex : ' <([A-Za-z0-9\/-_])+\.hpp>'
27+ Priority : 20
28+ PointerAlignment : Left
Original file line number Diff line number Diff line change 1+ [* ]
2+ insert_final_newline = true
3+ charset = utf-8
4+ indent_size = 4
5+ indent_style = tab
6+ # Optional: git will commit as lf, this will only affect local files
7+ end_of_line = lf
8+
9+ [CMakeLists.txt ]
10+ indent_style = space
11+ indent_size = 2
12+
13+ [* .{py,md,yml,sh,cmake} ]
14+ indent_style = space
15+ indent_size = 2
16+
17+ [* .{py,md,yml,sh}.in ]
18+ indent_style = space
19+ indent_size = 2
Original file line number Diff line number Diff line change 1+ # VSCode, clangd etc
2+ ** /out /*
3+ ** /build /*
4+ .vscode /
5+ .cache /
6+ compile_commands.json
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14 )
2+
3+ set (CMAKE_CXX_EXTENSIONS OFF )
4+
5+ project (sfml-misc)
6+
7+ set (CMAKE_BUILD_TYPE Debug CACHE STRING "" )
8+
9+ file (GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "src/*.?pp" )
10+
11+ add_executable (${PROJECT_NAME } ${SOURCES} )
12+
13+ target_include_directories (${PROJECT_NAME } PRIVATE src )
14+
15+ if (CMAKE_CXX_COMPILER_ID STREQUAL MSVC )
16+ target_compile_options (${PROJECT_NAME } PRIVATE $<$<NOT :$<CONFIG :Debug >>:/WX >)
17+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU)
18+ target_compile_options (${PROJECT_NAME } PRIVATE -Wall -Wextra $<$<NOT :$<CONFIG :Debug >>:-Werror >)
19+ endif ()
20+
Original file line number Diff line number Diff line change 1+ {
2+ "version" : 1 ,
3+ "cmakeMinimumRequired" : {
4+ "major" : 3 ,
5+ "minor" : 19 ,
6+ "patch" : 0
7+ },
8+ "configurePresets" : [
9+ {
10+ "name" : " debug" ,
11+ "displayName" : " Debug" ,
12+ "description" : " Debug build using Ninja/clang" ,
13+ "generator" : " Ninja" ,
14+ "binaryDir" : " out/db" ,
15+ "cacheVariables" : {
16+ "CMAKE_C_COMPILER" : {
17+ "type" : " STRING" ,
18+ "value" : " clang"
19+ },
20+ "CMAKE_CXX_COMPILER" : {
21+ "type" : " STRING" ,
22+ "value" : " clang++"
23+ },
24+ "CMAKE_BUILD_TYPE" : {
25+ "type" : " STRING" ,
26+ "value" : " Debug"
27+ }
28+ }
29+ },
30+ {
31+ "name" : " release" ,
32+ "displayName" : " Release" ,
33+ "description" : " Release build using Ninja/clang" ,
34+ "generator" : " Ninja" ,
35+ "binaryDir" : " out/rl" ,
36+ "cacheVariables" : {
37+ "CMAKE_C_COMPILER" : {
38+ "type" : " STRING" ,
39+ "value" : " clang"
40+ },
41+ "CMAKE_CXX_COMPILER" : {
42+ "type" : " STRING" ,
43+ "value" : " clang++"
44+ },
45+ "CMAKE_BUILD_TYPE" : {
46+ "type" : " STRING" ,
47+ "value" : " Release"
48+ }
49+ }
50+ }
51+ ]
52+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+
3+ int main () {
4+ std::cout << " Hello world\n " ;
5+ }
You can’t perform that action at this time.
0 commit comments