Skip to content

Instantly share code, notes, and snippets.

@leehambley
Created December 18, 2011 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leehambley/54ed7852efc4ed81a326 to your computer and use it in GitHub Desktop.
Save leehambley/54ed7852efc4ed81a326 to your computer and use it in GitHub Desktop.
# =========================================================================== #
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment