diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b0b79f4..09e95e1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,6 +8,8 @@ jobs: name: "coverage" steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Install lcov by Homebrew run: brew install lcov - name: Build && Test && Upload diff --git a/.github/workflows/darwin.yml b/.github/workflows/darwin.yml index 85a0aeb..07e86ea 100644 --- a/.github/workflows/darwin.yml +++ b/.github/workflows/darwin.yml @@ -16,6 +16,8 @@ jobs: name: "xcode-${{matrix.config.xcode}}" steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Select Xcode run: sudo xcode-select --switch "/Applications/Xcode_${{matrix.config.xcode}}.app" - name: Build && Test diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3f508ac..c785bc7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -14,6 +14,7 @@ jobs: - { os: "ubuntu-20.04", cc: "gcc-8", cxx: "g++-8" } - { os: "ubuntu-20.04", cc: "gcc-9", cxx: "g++-9" } - { os: "ubuntu-20.04", cc: "gcc-10", cxx: "g++-10" } + - { os: "ubuntu-20.04", cc: "clang-7", cxx: "clang++-7" } - { os: "ubuntu-20.04", cc: "clang-8", cxx: "clang++-8" } - { os: "ubuntu-20.04", cc: "clang-9", cxx: "clang++-9" } - { os: "ubuntu-20.04", cc: "clang-10", cxx: "clang++-10" } @@ -23,6 +24,8 @@ jobs: run: sudo apt-get -y install "${{matrix.config.cc}}" "${{matrix.config.cxx}}" - name: Checkout uses: actions/checkout@v2 + with: + submodules: recursive - name: Build && Test run: .ci/build_linux.sh env: { CC: "${{matrix.config.cc}}", CXX: "${{matrix.config.cxx}}" } diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1c48908..1486034 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,5 +17,7 @@ jobs: name: "${{matrix.config.vs}} ${{matrix.config.arch}}" steps: - uses: actions/checkout@v2 + with: + submodules: recursive - name: Build && Test run: .ci\build_windows_${{matrix.config.arch}}.bat diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d64e76..ea8e62b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR) if(NOT DEFINED PROJECT_NAME) set(BUILD_AS_STANDALONE ON) +else() + set(BUILD_AS_STANDALONE OFF) endif() project(vmath.hpp) @@ -15,6 +17,26 @@ add_library(${PROJECT_NAME}.singles INTERFACE) target_compile_features(${PROJECT_NAME}.singles INTERFACE cxx_std_17) target_include_directories(${PROJECT_NAME}.singles INTERFACE singles) +target_compile_options(${PROJECT_NAME} + INTERFACE + $<$,$>: + -Wno-c++98-compat-pedantic + -Wno-ctad-maybe-unsupported + -Wno-double-promotion + -Wno-float-equal + -Wno-shadow + -Wno-unknown-warning-option>) + +target_compile_options(${PROJECT_NAME}.singles + INTERFACE + $<$,$>: + -Wno-c++98-compat-pedantic + -Wno-ctad-maybe-unsupported + -Wno-double-promotion + -Wno-float-equal + -Wno-shadow + -Wno-unknown-warning-option>) + if(BUILD_AS_STANDALONE) option(BUILD_WITH_UNTESTS "Build with unit tests" ON) if(BUILD_WITH_UNTESTS) diff --git a/README.md b/README.md index 8629460..db12e12 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ ## Requirements - [gcc](https://www.gnu.org/software/gcc/) **>= 7** -- [clang](https://clang.llvm.org/) **>= 5.0** +- [clang](https://clang.llvm.org/) **>= 7** - [msvc](https://visualstudio.microsoft.com/) **>= 2017** ## Installation diff --git a/untests/CMakeLists.txt b/untests/CMakeLists.txt index 0220203..cac5ff7 100644 --- a/untests/CMakeLists.txt +++ b/untests/CMakeLists.txt @@ -23,15 +23,12 @@ target_link_libraries(${PROJECT_NAME} vmath.hpp.singles) target_compile_options(${PROJECT_NAME} PRIVATE $<$: - /W4> + /WX /W4> PRIVATE $<$: - -Wall -Wextra -Wpedantic> + -Werror -Wall -Wextra -Wpedantic> PRIVATE $<$,$>: - -Weverything -Wno-unknown-warning-option - -Wconversion -Wimplicit-int-float-conversion - -Wno-c++98-compat-pedantic -Wno-ctad-maybe-unsupported - -Wno-float-equal -Wno-double-promotion -Wno-shadow-field-in-constructor>) + -Werror -Weverything -Wconversion>) add_test(${PROJECT_NAME} ${PROJECT_NAME})