File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,15 @@ Coding guidelines
49
49
Build & test
50
50
------------
51
51
52
+ This repository requires Gnu g++ compiler minimum version 13 to support C++20
53
+ features such as ` std::format() ` used in code.
54
+
52
55
This repository uses Gnu Makefile to run build and test tasks along with some
53
56
helper tasks such as to run formatter, linter for source code.
54
57
58
+ Build is tested and tests are verified on Gnu/Linux & Cygwin (Windows)
59
+ operating systems.
60
+
55
61
### Examples
56
62
57
63
``` bash
Original file line number Diff line number Diff line change @@ -8,9 +8,25 @@ all: tests check
8
8
# ============================================================================
9
9
include ../mk/common.mk
10
10
11
- CXX = /usr/bin/g++-13
11
+ CXX = /usr/bin/g++
12
+ MIN_GPP_VERSION =13
13
+ GPP_VERSION: =$(shell $(CXX ) -dumpfullversion | cut -d. -f1)
14
+ CHECK_GPP_VERSION: =$(shell expr "$(GPP_VERSION ) " ">=" "$(MIN_GPP_VERSION ) ")
15
+
16
+ ifneq "$(CHECK_GPP_VERSION ) " "1"
17
+ $(error ERROR : $(CXX ) version $(GPP_VERSION ) is lower than required \
18
+ minimum version $(MIN_GPP_VERSION))
19
+ endif
20
+
12
21
CXXFLAGS = -std=c++20 -Wall -Wextra -Wpedantic -Werror -Iincludes
13
22
23
+ SYS_NAME: =$(shell uname -s)
24
+ IS_CYGWIN: =$(findstring CYGWIN, $(SYS_NAME ) )
25
+
26
+ ifeq ($(IS_CYGWIN ) , CYGWIN)
27
+ CXXFLAGS += -static-libstdc++
28
+ endif
29
+
14
30
BUILD_DIR: =build
15
31
16
32
HDRS: =$(shell $(GIT_LS ) -- 'includes/* .h')
You can’t perform that action at this time.
0 commit comments