diff --git a/.cirrus.yml b/.cirrus.yml index 3578fb7..9c826d9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,16 +1,17 @@ task: - name: Linux gcc 5/9/latest builds + name: Linux gcc 9/11/latest builds skip: "changesIncludeOnly('docs/*')" env: CIRRUS_CLONE_DEPTH: 1 CIRRUS_CLONE_SUBMODULES: true container: matrix: - image: gcc:5 image: gcc:9 + image: gcc:11 image: gcc:latest cpu: 2 memory: 1G + gcc_version_script: gcc --version build_script: make clean && make -j3 install_script: make install && make clean ## now try the built+installed sjasmplus with some tests and examples @@ -41,9 +42,7 @@ pipe: cpu: 2 memory: 1G steps: - # demoted back to gcc6 because gcov+lcov in gcc:8 and 9 image seems to produce a bit damaged coverage results? - # (I didn't dig into the issue, just trying to change version back to where it works well) - - image: gcc:6 + - image: gcc:11 generate_gcov_script: make clean && make -j3 coverage - image: python:3.7 # installing my patched version of "cpp-coveralls" to get support for CI_SERVICE_NAME and git-revision number @@ -121,15 +120,13 @@ task: CIRRUS_CLONE_DEPTH: 1 CIRRUS_CLONE_SUBMODULES: true macos_instance: - #image: big-sur-base - image: ghcr.io/cirruslabs/macos-monterey-base:latest - #sw_versions2_script: - #- git --version || echo "no git" - #- bash --version || echo "no bash" - #- make --version || echo "no make" - #- cc --version || echo "no cc" - #- c++ --version || echo "no c++" - build_script: + image: ghcr.io/cirruslabs/macos-sonoma-base:latest + sw_versions2_script: + - git --version || echo "no git" + - bash --version || echo "no bash" + - make --version || echo "no make" + - cc --version || echo "no cc" + - c++ --version || echo "no c++" - date - - make clean && make -j10 CC=cc CXX=c++ + build_script: make clean && make -j10 CC=cc CXX=c++ test_script: make clean && make -j10 CC=cc CXX=c++ tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 286d1b0..a28bf5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,9 +39,9 @@ set(SOURCES add_definitions(-DMAX_PATH=PATH_MAX) add_definitions(-DCMAKE) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS ON) +set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -pedantic") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic") diff --git a/INSTALL.md b/INSTALL.md index 91b92b5..75fdfb7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,7 +13,7 @@ or - complete MinGW environment for MS Windows, configured with MinGW bin directories added in `PATH` variable (typically `C:\MinGW\bin;` `C:\MinGW\msys\1.0\bin`) or possibly with any BASH emulator (e.g. the one which comes with [git for windows](https://gitforwindows.org/)) will do it instead of msys is missing / not set. - CMake installed into MinGW bin directory (optionally) -Compilation is tested with GCC 5.5.0, it should run also with older 5.x versions. It will not work with GCC 4.x and older. +C++17 standard is required, compilation is tested with GCC 9.5.0, it should run also with older 9.x versions. It will not work with GCC 8.x and older. C++17 is required since v1.21.0, older versions required C++14 and can be built with GCC 5.x. ## Getting full source code of sjasmplus diff --git a/Makefile b/Makefile index eedb51b..ab0f05b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # make tests - to run the CI test+example script runner # make memcheck TEST=misc DEBUG=1 - to use valgrind on assembling sub-directory "misc" in tests # make PREFIX=~/.local install - to install release version into ~/.local/bin/ -# make clean && make CC=gcc-8 CXX=g++-8 - to compile binary with gcc-8 +# make clean && make CC=gcc-9 CXX=g++-9 - to compile binary with gcc-9 # make DEBUG=1 LUA_COVERAGE=1 coverage - to produce build/debug/coverage/* files by running the tests # make COVERALLS_SERVICE=1 DEBUG=1 coverage - to produce coverage data and upload them to https://coveralls.io/ # make CFLAGS_EXTRA='-m32' LDFLAGS='-ldl -m32' - to builds 32b linux executable @@ -103,7 +103,7 @@ CFLAGS+=-DNDEBUG -O2 endif # C++ flags (the CPPFLAGS are for preprocessor BTW, if you always wonder, like me...) -CXXFLAGS?=-std=gnu++14 $(CFLAGS) +CXXFLAGS?=-std=c++17 $(CFLAGS) # full path to executable BUILD_EXE=$(BUILD_DIR)/$(EXE_BASE_NAME) diff --git a/Makefile.win b/Makefile.win index b924cbe..0a6bf71 100644 --- a/Makefile.win +++ b/Makefile.win @@ -26,7 +26,7 @@ SUBDIR_CRC32C=crc32c # Ped7g: -pedantic removed due to Lua5.4 having too many warnings CFLAGS=-DNDEBUG -O2 -Wall -static -DUSE_LUA -DMAX_PATH=PATH_MAX -I$(SUBDIR_LUA) -I$(SUBDIR_LUABRIDGE) -I$(SUBDIR_CRC32C) -CXXFLAGS=-std=gnu++14 $(CFLAGS) +CXXFLAGS=-std=c++17 $(CFLAGS) LDFLAGS= -s diff --git a/docs/documentation.xml b/docs/documentation.xml index 111be0d..4eeab99 100644 --- a/docs/documentation.xml +++ b/docs/documentation.xml @@ -208,6 +208,7 @@ +- C++17 standard is now required minimum (to compile sjasmplus sources) (GCC9 for example) - `INCBIN`, `INCHOB` and `INCTRD` support now include paths priority (angle <filename> vs "filename") - include paths which can't be opened before assembling are now reported in error message - include paths which start with literal tilde '~' are reported in error message