Created
October 9, 2020 23:19
-
-
Save cyrusbehr/2c25015c194d11686f230a5af4e0d574 to your computer and use it in GitHub Desktop.
Unit testing CMake
This file contains hidden or 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
| # Unit test | |
| add_executable(run_tests tests/test.cpp) | |
| target_link_libraries(run_tests ${CMAKE_CURRENT_BINARY_DIR}/libmy_sdk.a) | |
| target_include_directories(run_tests PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include) | |
| target_include_directories(run_tests PRIVATE ${CMAKE_CURRENT_LIST_DIR}/3rdparty/catch2) | |
| add_dependencies(run_tests my_sdk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment