Modernize CMake (3): hippomocks (make it into a real cmake library)
parent
cbd2108eec
commit
1f2f857221
|
@ -455,8 +455,7 @@ if(TESTS)
|
|||
|
||||
add_subdirectory(${GTEST_SRC_DIR} lib/gtest)
|
||||
|
||||
# Hippomocks library
|
||||
set(HIPPOMOCKS_INCLUDE_DIR ${colobot_SOURCE_DIR}/lib/hippomocks)
|
||||
add_subdirectory(lib/hippomocks)
|
||||
|
||||
# Tests targets
|
||||
enable_testing()
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
add_library(hippomocks INTERFACE)
|
||||
target_include_directories(hippomocks SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
@ -32,7 +32,6 @@ include_directories(
|
|||
include_directories(
|
||||
SYSTEM
|
||||
${GTEST_INCLUDE_DIR}
|
||||
${HIPPOMOCKS_INCLUDE_DIR}
|
||||
${COLOBOT_SYSTEM_INCLUDES}
|
||||
)
|
||||
|
||||
|
@ -56,7 +55,7 @@ file(COPY ${TEST_FILES} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
|||
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
|
||||
|
||||
add_executable(colobot_ut ${UT_SOURCES})
|
||||
target_link_libraries(colobot_ut ${LIBS})
|
||||
target_link_libraries(colobot_ut ${LIBS} hippomocks)
|
||||
|
||||
add_test(
|
||||
NAME colobot_ut
|
||||
|
|
Loading…
Reference in New Issue