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
4949Build & test
5050------------
5151
52+ This repository requires Gnu g++ compiler minimum version 13 to support C++20
53+ features such as ` std::format() ` used in code.
54+
5255This repository uses Gnu Makefile to run build and test tasks along with some
5356helper tasks such as to run formatter, linter for source code.
5457
58+ Build is tested and tests are verified on Gnu/Linux & Cygwin (Windows)
59+ operating systems.
60+
5561### Examples
5662
5763``` bash
Original file line number Diff line number Diff line change @@ -8,9 +8,25 @@ all: tests check
88# ============================================================================
99include ../mk/common.mk
1010
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+
1221CXXFLAGS = -std=c++20 -Wall -Wextra -Wpedantic -Werror -Iincludes
1322
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+
1430BUILD_DIR: =build
1531
1632HDRS: =$(shell $(GIT_LS ) -- 'includes/* .h')
You can’t perform that action at this time.
0 commit comments