-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add googletest #3672
base: main
Are you sure you want to change the base?
add googletest #3672
Conversation
Sounds great, thanks! Is the process like this? cd ~/VAPOR This creates some files, but also outputs this:
|
Hey @ifranda , can you do the following and retry? I think 2) is probably the cause.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
CMakeLists.txt
Outdated
FetchContent_Declare( googletest | ||
URL https://github.com/google/googletest/archive/refs/heads/main.zip | ||
DOWNLOAD_EXTRACT_TIMESTAMP NEW ) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ifranda , could you remove the if()
and endif()
lines (line 132 and 136) for me? The CMake version should be specified at the beginning of the CMakeLists.txt
(Line 7, cmake_minimum_required()
) function, instead of here.
(I lost my access to update this PR.)
Sure! I’m not at my computer right now but I’ll update it tonight or tomorrow |
This PR adds GoogleTest into the CMake system, and also tests the behavior of
ptr_cache.hpp
.It introduces a new build option,
BUILD_GOOGLE_TEST
. When it's set toTRUE
, a test app will be build in the build directory:googletest_scripts
To run this test, one can either invoke it directly:
./googletest_scripts/ptr_cache_test
, or run a single ctest command:ctest .
. The latter is convenient when a lot of unit test programs are there.@ifranda Please let me know if you have any questions!