Last active
June 4, 2018 22:03
-
-
Save johnX9/928235843bc31d747c92e30f0bd4c26f 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
cmake_minimum_required(VERSION 3.5) | |
# Prepare "Catch" library for other executables | |
set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/frameworks) | |
add_library(Catch INTERFACE) | |
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}) | |
# Add unit tests files here | |
# Example: players_tests.cpp marketplace_tests.cpp and etc. | |
set(unit_tests_files | |
players_tests.cpp) | |
foreach(test_file ${unit_tests_files}) | |
get_filename_component(file_name ${test_file} NAME_WE) | |
add_executable(${file_name} ${test_file}) | |
target_link_libraries(${file_name} Catch) | |
add_test(NAME ${file_name} COMMAND ${file_name} "-s" "-r" "compact" "--use-colour" "yes") | |
endforeach() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment