Création Test
This commit is contained in:
parent
611ff37653
commit
dd67b76d1f
6 changed files with 79 additions and 6 deletions
|
@ -20,3 +20,16 @@ set(CMAKE_CXX_STANDARD 23)
|
|||
|
||||
add_subdirectory(src)
|
||||
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/releases/download/v1.16.0/googletest-1.16.0.tar.gz
|
||||
)
|
||||
|
||||
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
|
||||
# enable_testing() must be in the source directory root (see cmake documentation at https://cmake.org/cmake/help/latest/command/enable_testing.html)
|
||||
# Otherwise, Visual Studio test explorer does not see unit tests (See ticket https://developercommunity.visualstudio.com/t/No-tests-discovered-for-googletest-and-C/1148799#T-ND1150621)
|
||||
include(GoogleTest)
|
||||
enable_testing()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue