mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
* Rename the library under test from src to GildedRoseLib. * Move the lib folder to test/third_party and handle ApprovalTests.hpp as header-only dependency. * Remove the superfluous googletest_approval_main.cpp (in the same sense as there is only one GildedRoseCatch2ApprovalTests.cc) * Set USE_FOLDERS property such that target ALL_BUILD, RUN_TESTS and ZERO_CHECK are grouped for Visual Studio. * Set WORKING_DIRECTORY such that the RUN_TESTS target works successfully. * Fix C++ language standard for Catch2 v3 to C++14. * Bump third-party dependencies * Update ApprovalTests.hpp to v10.13.0 * Update Catch2 to v3.8.0 * Update GTest to v1.16.0
33 lines
775 B
CMake
33 lines
775 B
CMake
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG v1.16.0
|
|
GIT_SHALLOW TRUE
|
|
)
|
|
|
|
FetchContent_Declare(
|
|
catch2
|
|
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
|
GIT_TAG v3.8.0
|
|
GIT_SHALLOW TRUE
|
|
)
|
|
|
|
FetchContent_MakeAvailable(googletest catch2)
|
|
|
|
# Force Google Test to link the C/C++ runtimes dynamically
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
|
|
# Disable building GMock
|
|
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
|
|
|
|
# Do not install GTest
|
|
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
|
|
|
add_subdirectory(cpp_catch2_approvaltest)
|
|
add_subdirectory(cpp_catch2_unittest)
|
|
add_subdirectory(cpp_googletest_approvaltest)
|
|
add_subdirectory(cpp_googletest_unittest)
|
|
add_subdirectory(cpp_texttest)
|