mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Renames library target to project name
Updates the CMakeLists.txt to use the project name as the library target name instead of hardcoding "omath". This change ensures consistency and avoids potential conflicts when integrating the library into other projects. It also aligns the target naming with CMake best practices.
This commit is contained in:
@@ -5,7 +5,7 @@ project(unit_tests)
|
||||
include(GoogleTest)
|
||||
|
||||
file(GLOB_RECURSE UNIT_TESTS_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
||||
add_executable(unit_tests ${UNIT_TESTS_SOURCES})
|
||||
add_executable(${PROJECT_NAME} ${UNIT_TESTS_SOURCES})
|
||||
|
||||
set_target_properties(unit_tests PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
|
||||
@@ -17,6 +17,6 @@ set_target_properties(unit_tests PROPERTIES
|
||||
CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
|
||||
target_link_libraries(unit_tests PRIVATE gtest gtest_main omath::omath)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gtest gtest_main omath::omath)
|
||||
|
||||
gtest_discover_tests(unit_tests)
|
||||
gtest_discover_tests(${PROJECT_NAME})
|
||||
Reference in New Issue
Block a user