build(cmake): isolate test-only dependencies

This commit is contained in:
KOKO\Mimi
2026-07-30 13:21:40 +09:00
parent 85b580bb23
commit 202e66c862
5 changed files with 42 additions and 6 deletions
+18
View File
@@ -37,11 +37,29 @@ set_property(
${FESA_DEPENDENCY_RUNTIME_MODIFICATIONS}
)
add_test(
NAME ProductionConfigureWithoutGTest
COMMAND
"${CMAKE_COMMAND}"
--fresh
-S "${CMAKE_SOURCE_DIR}"
-B "${CMAKE_BINARY_DIR}/testing/production-no-gtest"
-G "${CMAKE_GENERATOR}"
-A "${CMAKE_GENERATOR_PLATFORM}"
-T "${CMAKE_VS_PLATFORM_TOOLSET}"
-DBUILD_TESTING=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_GTest=TRUE
"-DMKL_DIR=${MKL_DIR}"
"-DTBB_DIR=${TBB_DIR}"
"-DHDF5_DIR=${HDF5_DIR}"
)
add_executable(fesa_core_value_tests
unit/core/diagnostic_test.cpp
unit/core/entity_id_test.cpp
unit/core/status_test.cpp
unit/core/vec3_test.cpp
unit/core/version_test.cpp
)
target_compile_features(fesa_core_value_tests PRIVATE cxx_std_20)
+11
View File
@@ -0,0 +1,11 @@
#include <gtest/gtest.h>
#include <fesa/core/version.hpp>
namespace {
TEST(Version, ReportsPhaseOneSemanticVersion) {
EXPECT_EQ(fesa::version(), "0.1.0");
}
} // namespace
@@ -11,6 +11,8 @@
namespace {
static_assert(sizeof(MKL_INT) == 4, "FESA requires the oneMKL LP64 interface.");
TEST(DependencySmoke, CallsOneMklVectorOperation) {
constexpr std::array<double, 3> x{1.0, 2.0, 3.0};
std::array<double, 3> y{4.0, 5.0, 6.0};