Skip to content

Commit

Permalink
cmake fake-timers-lib interface style library declared and used.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheweshleman committed Oct 17, 2024
1 parent 8a4ea4e commit 1a9507f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(fake-timers)
include_directories(include)
add_subdirectory(tests)

add_library(fake-timers-lib INTERFACE)
target_include_directories(fake-timers-lib INTERFACE include)

add_subdirectory(tests)
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include_directories(${CPPUTEST_INCLUDE_DIRS})
link_directories(${CPPUTEST_LIBRARIES})

add_executable(${TEST_APP_NAME} ${TEST_SOURCES})
target_link_libraries(${TEST_APP_NAME} ${APP_LIB_NAME} ${CPPUTEST_LDFLAGS} )
target_link_libraries(${TEST_APP_NAME} ${APP_LIB_NAME} ${CPPUTEST_LDFLAGS} fake-timers-lib)

# (5) Run the test once the build is done
add_custom_command(TARGET ${TEST_APP_NAME} COMMAND ./${TEST_APP_NAME} POST_BUILD)

0 comments on commit 1a9507f

Please sign in to comment.