mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-15 04:35:25 +07:00
fix some warnings
This commit is contained in:
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -8,6 +8,8 @@ jobs:
|
|||||||
name: "coverage"
|
name: "coverage"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
- name: Install lcov by Homebrew
|
- name: Install lcov by Homebrew
|
||||||
run: brew install lcov
|
run: brew install lcov
|
||||||
- name: Build && Test && Upload
|
- name: Build && Test && Upload
|
||||||
|
|||||||
2
.github/workflows/darwin.yml
vendored
2
.github/workflows/darwin.yml
vendored
@@ -16,6 +16,8 @@ jobs:
|
|||||||
name: "xcode-${{matrix.config.xcode}}"
|
name: "xcode-${{matrix.config.xcode}}"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
- name: Select Xcode
|
- name: Select Xcode
|
||||||
run: sudo xcode-select --switch "/Applications/Xcode_${{matrix.config.xcode}}.app"
|
run: sudo xcode-select --switch "/Applications/Xcode_${{matrix.config.xcode}}.app"
|
||||||
- name: Build && Test
|
- name: Build && Test
|
||||||
|
|||||||
3
.github/workflows/linux.yml
vendored
3
.github/workflows/linux.yml
vendored
@@ -14,6 +14,7 @@ jobs:
|
|||||||
- { os: "ubuntu-20.04", cc: "gcc-8", cxx: "g++-8" }
|
- { 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-9", cxx: "g++-9" }
|
||||||
- { os: "ubuntu-20.04", cc: "gcc-10", cxx: "g++-10" }
|
- { 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-8", cxx: "clang++-8" }
|
||||||
- { os: "ubuntu-20.04", cc: "clang-9", cxx: "clang++-9" }
|
- { os: "ubuntu-20.04", cc: "clang-9", cxx: "clang++-9" }
|
||||||
- { os: "ubuntu-20.04", cc: "clang-10", cxx: "clang++-10" }
|
- { 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}}"
|
run: sudo apt-get -y install "${{matrix.config.cc}}" "${{matrix.config.cxx}}"
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
- name: Build && Test
|
- name: Build && Test
|
||||||
run: .ci/build_linux.sh
|
run: .ci/build_linux.sh
|
||||||
env: { CC: "${{matrix.config.cc}}", CXX: "${{matrix.config.cxx}}" }
|
env: { CC: "${{matrix.config.cc}}", CXX: "${{matrix.config.cxx}}" }
|
||||||
|
|||||||
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@@ -17,5 +17,7 @@ jobs:
|
|||||||
name: "${{matrix.config.vs}} ${{matrix.config.arch}}"
|
name: "${{matrix.config.vs}} ${{matrix.config.arch}}"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
- name: Build && Test
|
- name: Build && Test
|
||||||
run: .ci\build_windows_${{matrix.config.arch}}.bat
|
run: .ci\build_windows_${{matrix.config.arch}}.bat
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
|||||||
|
|
||||||
if(NOT DEFINED PROJECT_NAME)
|
if(NOT DEFINED PROJECT_NAME)
|
||||||
set(BUILD_AS_STANDALONE ON)
|
set(BUILD_AS_STANDALONE ON)
|
||||||
|
else()
|
||||||
|
set(BUILD_AS_STANDALONE OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(vmath.hpp)
|
project(vmath.hpp)
|
||||||
@@ -15,6 +17,26 @@ add_library(${PROJECT_NAME}.singles INTERFACE)
|
|||||||
target_compile_features(${PROJECT_NAME}.singles INTERFACE cxx_std_17)
|
target_compile_features(${PROJECT_NAME}.singles INTERFACE cxx_std_17)
|
||||||
target_include_directories(${PROJECT_NAME}.singles INTERFACE singles)
|
target_include_directories(${PROJECT_NAME}.singles INTERFACE singles)
|
||||||
|
|
||||||
|
target_compile_options(${PROJECT_NAME}
|
||||||
|
INTERFACE
|
||||||
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||||
|
-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
|
||||||
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||||
|
-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)
|
if(BUILD_AS_STANDALONE)
|
||||||
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
|
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
|
||||||
if(BUILD_WITH_UNTESTS)
|
if(BUILD_WITH_UNTESTS)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- [gcc](https://www.gnu.org/software/gcc/) **>= 7**
|
- [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**
|
- [msvc](https://visualstudio.microsoft.com/) **>= 2017**
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|||||||
@@ -23,15 +23,12 @@ target_link_libraries(${PROJECT_NAME} vmath.hpp.singles)
|
|||||||
target_compile_options(${PROJECT_NAME}
|
target_compile_options(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:
|
$<$<CXX_COMPILER_ID:MSVC>:
|
||||||
/W4>
|
/WX /W4>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<CXX_COMPILER_ID:GNU>:
|
$<$<CXX_COMPILER_ID:GNU>:
|
||||||
-Wall -Wextra -Wpedantic>
|
-Werror -Wall -Wextra -Wpedantic>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||||
-Weverything -Wno-unknown-warning-option
|
-Werror -Weverything -Wconversion>)
|
||||||
-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>)
|
|
||||||
|
|
||||||
add_test(${PROJECT_NAME} ${PROJECT_NAME})
|
add_test(${PROJECT_NAME} ${PROJECT_NAME})
|
||||||
|
|||||||
Reference in New Issue
Block a user