secret
Created

  • Download Gist
CMakeLists.txt
CMake
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# =========================================================================== #
# Following the Ruby *_test naming scheme.
# =========================================================================== #
file(GLOB_RECURSE test_sources "${PROJECT_SOURCE_DIR}/*_test.c")
 
# =========================================================================== #
# CMockery mainline is good enough
# =========================================================================== #
include(${CMAKE_MODULE_PATH}/FindCMockery.cmake)
find_package(CMockery REQUIRED)
 
# ===========================================================================
# These are our tests, they're an executable with their own main()
# ===========================================================================
add_executable(libwatcheditTest ${test_sources})
 
# ===========================================================================
# Linking the tests
# ===========================================================================
target_link_libraries(libwatcheditTest watchedit)
target_link_libraries(libwatcheditTest cmockery)
 
# ===========================================================================
# Headers are important
# ===========================================================================
include_directories(${CMOCKERY_INCLUDE_DIRS})
 
# ===========================================================================
# Just one test right now, this might have to change in the future
# ===========================================================================
add_test(libwatchedit libwatcheditTest)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.