forked from mjwybrow/adaptagrams
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Aksem/feature/versioning
Add version 1.0.0. Improve testing config
- Loading branch information
Showing
6 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
macro(package_add_test TESTNAME) | ||
set(options) | ||
set(oneValueArgs SOURCE) | ||
set(multiValueArgs LIBRARIES DEFINITIONS) | ||
cmake_parse_arguments(PACKAGE_ADD_TEST "${options}" "${oneValueArgs}" | ||
"${multiValueArgs}" ${ARGN} ) | ||
|
||
# create an executable in which the tests will be stored | ||
add_executable(${TESTNAME} ${PACKAGE_ADD_TEST_SOURCE}) | ||
# link the Google test infrastructure, mocking library, and a default main function to | ||
# the test executable. Remove g_test_main if writing your own main function. | ||
target_link_libraries(${TESTNAME} gtest gmock gtest_main ${PACKAGE_ADD_TEST_LIBRARIES}) | ||
# gtest_discover_tests replaces gtest_add_tests, | ||
# see https://cmake.org/cmake/help/v3.10/module/GoogleTest.html for more options to pass to it | ||
gtest_discover_tests(${TESTNAME} | ||
# set a working directory so your project root so that you can find test data via paths relative to the project root | ||
WORKING_DIRECTORY ${PROJECT_DIR} | ||
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_DIR}" | ||
) | ||
# set_target_properties(${TESTNAME} PROPERTIES FOLDER tests) | ||
target_compile_definitions(${TESTNAME} PRIVATE ${PACKAGE_ADD_TEST_DEFINITIONS}) | ||
endmacro() |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.