maded vec3 constexprable, addded lvl waring option

This commit is contained in:
2024-09-03 01:54:23 +03:00
parent c0d505b5e2
commit 9e32b043d0
6 changed files with 198 additions and 231 deletions

View File

@@ -6,7 +6,7 @@ project(omath)
set(CMAKE_CXX_STANDARD 26)
option(BUILD_TESTS "Build unit tests" ON)
option(THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to threat them as errors" ON)
add_library(omath STATIC source/Vector3.cpp)
add_subdirectory(source)
@@ -16,4 +16,10 @@ if(BUILD_TESTS)
add_subdirectory(tests)
endif ()
if (WIN32 AND THREAT_WARNING_AS_ERROR)
target_compile_definitions(omath PRIVATE /W4 /WX)
elseif(UNIX AND THREAT_WARNING_AS_ERROR)
target_compile_definitions(omath PRIVATE -Wall -Wextra -Wpedantic)
endif()
target_include_directories(omath PUBLIC include)