-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Catch.cmake: Support CMake multi-config with PRE_TEST discovery mode #2739
Conversation
Codecov Report
@@ Coverage Diff @@
## devel #2739 +/- ##
==========================================
+ Coverage 91.32% 91.36% +0.03%
==========================================
Files 192 190 -2
Lines 7850 7855 +5
==========================================
+ Hits 7169 7176 +7
+ Misses 681 679 -2 |
How far along is this? |
@horenmar, IMHO it's ready for review. I was hesitating, because of missing experience with the usage of multi-config targets. After re-reading the docs, made it finally work correctly. Could you pls review? |
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.
I tested this with MSVC and it seems to work.
630c7f0
to
9b930ec
Compare
"if(NOT CTEST_CONFIGURATION_TYPE)" "\n" | ||
" message(\"No configuration for testing specified, use '-C <cfg>'.\")" "\n" | ||
"else()" "\n" | ||
" include(\"${ctest_file_base}_include-\${CTEST_CONFIGURATION_TYPE}.cmake\")" "\n" | ||
"endif()" "\n" |
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.
This is fine to merge already, but I still have a question: is there a reason to do this like this (outside of consistency with the surrounding code), rather than either making the newlines part of the line-strings, or using multiline strings?
IIRC something like this would work as well and be simpler to read
set(ctest_include_multi_content [[
if(NOT CTEST_CONFIGURATION_TYPE)
message("No configuration for testing specified, use '-C <cfg>'.")
else()
include("C:/ubuntu/temp/discover-tests-tests/msvc-sln-1/tests-b12d07c_include-${CTEST_CONFIGURATION_TYPE}.cmake")
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.
Right, the issue is that we want to interpret some of the variables, while [[]]
does not do any interpretation. nevermind then
Description
Support CMake multi-config generators with PRE_TEST discovery mode.
Cf. #2670 (comment)
GitHub Issues