-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
cmake // Added Ctest support for unittests #882
Conversation
By analyzing the blame information on this pull request, we identified @billhoffman, @Sukender and @Lekensteyn to be potential reviewers |
@bradking Brad, could you please review and comment? Thank you! |
@@ -1042,6 +1042,8 @@ if(BUILD_CURL_EXE) | |||
add_subdirectory(src) | |||
endif() | |||
if(BUILD_CURL_TESTS) | |||
include(CTest) | |||
enable_testing() |
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.
The CTest
module calls enable_testing
for us so we don't need to call it here.
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.
@bradking From which version? Looks I'm a bit outdated here.
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.
It has always done this.
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.
Note that it depends on BUILD_TESTING
.
@bradking updated and rebased into single commit. |
The include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif() However, curl is currently defining its own BUILD_CURL_TESTS option. It also has a code path that includes the |
@bradking So what is your proposal, exactly? Should I remove BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS anywhere in scripts? |
That would be the simplest solution. Since the CMake files still warn that they are poorly maintained I don't think anyone expects stability in the current options. |
@bradking updated. |
The change itself looks good. Please squash in the fixups and revise the commit message to explain the new logic change. |
tests and enabling CTest integration. Options BUILD_CURL_TESTS and BUILD_DASHBOARD_REPORTS was removed.
Done, thanks! Small nit: please make the commit message to follow our commit styles and I'll have an easier job merging your work! |
Hi all,
I've enabled ctest verification for cmake builds and
tests/unit
folder.Now it is possible after build run
on Linux
make test
on Windows
ctest -VV -C <Debug|Release>