mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-12 22:53:27 +00:00
Links tests to gtest when available
Conditionally links the test target to gtest when it is available, rather than requiring the OMATH_BUILD_VIA_VCPKG flag to be false. This allows for a more flexible test setup.
This commit is contained in:
@@ -16,7 +16,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
|
||||
|
||||
|
||||
if (NOT OMATH_BUILD_VIA_VCPKG)
|
||||
if (TARGET gtest)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gtest gtest_main omath::omath)
|
||||
else()
|
||||
find_package(GTest CONFIG REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user