-
-
Save leehambley/54ed7852efc4ed81a326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =========================================================================== # | |
# 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