diff --git a/CMakeLists.txt b/CMakeLists.txt index d87052c..a51519c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(omath VERSION 1.0.1 LANGUAGES CXX) include(CMakePackageConfigHelpers) -option(OMATH_BUILD_TESTS "Build unit tests" OFF) +option(OMATH_BUILD_TESTS "Build unit tests" ON) option(OMATH_THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to treat them as errors" ON) option(OMATH_BUILD_AS_SHARED_LIBRARY "Build Omath as .so or .dll" OFF) option(OMATH_USE_AVX2 "Omath will use AVX2 to boost performance" ON) @@ -13,7 +13,7 @@ option(OMATH_IMGUI_INTEGRATION "Omath will define method to convert omath types option(OMATH_BUILD_EXAMPLES "Build example projects with you can learn & play" OFF) option(OMATH_STATIC_MSVC_RUNTIME_LIBRARY "Force Omath to link static runtime" OFF) option(OMATH_SUPRESS_SAFETY_CHECKS "Supress some safety checks in release build to improve general performance" ON) - +option(OMATH_USE_UNITY_BUILD "Will enable unity build to speed up compilation" OFF) if (OMATH_BUILD_AS_SHARED_LIBRARY) add_library(omath SHARED source/matrix.cpp) @@ -54,11 +54,15 @@ endif() set_target_properties(omath PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}" - UNITY_BUILD ON - UNITY_BUILD_BATCH_SIZE 20 CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON) +if (OMATH_USE_UNITY_BUILD) + set_target_properties(omath PROPERTIES + UNITY_BUILD ON + UNITY_BUILD_BATCH_SIZE 20) +endif() + if (OMATH_STATIC_MSVC_RUNTIME_LIBRARY) set_target_properties(omath PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" diff --git a/include/omath/3d_primitives/box.hpp b/include/omath/3d_primitives/box.hpp index a59b235..afc7003 100644 --- a/include/omath/3d_primitives/box.hpp +++ b/include/omath/3d_primitives/box.hpp @@ -4,7 +4,7 @@ #pragma once #include - +#include "omath/vector3.hpp" namespace omath::primitives { diff --git a/tests/general/unit_test_box_primitive.cpp b/tests/general/unit_test_box_primitive.cpp index f38e6e1..215f222 100644 --- a/tests/general/unit_test_box_primitive.cpp +++ b/tests/general/unit_test_box_primitive.cpp @@ -1,4 +1,6 @@ // // Created by Vlad on 4/18/2025. // -#include \ No newline at end of file +#include +#include +