fix some warnings

This commit is contained in:
BlackMATov
2021-08-06 03:24:08 +07:00
parent 694cdb5819
commit 2e007f721e
7 changed files with 35 additions and 7 deletions

View File

@@ -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
$<$<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)
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
if(BUILD_WITH_UNTESTS)