Notes |
|
(0021583)
|
Kovarththanan Rajaratnam
|
2010-07-31 02:53
|
|
Thanks for the patch. Sadly the patch isn't backwards compatible. CXXTEST_PYTHON_TESTGEN_EXECUTABLE and CXXTEST_PERL_TESTGEN_EXECUTABLE has been removed. Can you rework the patch to retain CXXTEST_PYTHON_TESTGEN_EXECUTABLE and CXXTEST_PERL_TESTGEN_EXECUTABLE? |
|
|
(0021584)
|
Droscy
|
2010-07-31 07:56
|
|
Yes, of course, you are right, I forgot that "MUST".
Attached the new patch:
- CXXTEST_PYTHON_TESTGEN_EXECUTABLE and CXXTEST_PERL_TESTGEN_EXECUTABLE are still present
- CXXTEST_TESTGEN_EXECUTABLE points to the used generator |
|
|
(0021764)
|
Philip Lowman
|
2010-08-15 19:13
|
|
I've merged Droscy's patch into the attached versions and made some additional improvements.
Some additional changes...
1. I've removed the warning if CXXTEST_USE_PYTHON is set wrong. The system now automatically uses python or perl if they are the only interpreter detected. The CXXTEST_USE_PYTHON variable is only used now if both interpreters are detected.
2. The interpreter that is being used (perl | python) is used to run the script now.
Feedback and testing would be appreciated. |
|
|
(0021802)
|
Droscy
|
2010-08-18 08:24
|
|
Hi Philip,
I think that your version is not fully backward compatible because if, for some reason, a user uses Python for the macro CXXTEST_ADD_TEST but uses also CXXTEST_PERL_TESTGEN_EXECUTABLE for manually creating a test suite, this behaviour is no more possible because CXXTEST_PERL_TESTGEN_EXECUTABLE is not set.
Let me explain better, consider the following code (Python and Perl both present):
set(CXXTEST_USE_PYTHON true)
find_package(CxxTest)
cxxtest_add_test(...) # python used
add_custom_command(
OUTPUT ${myoutput}
COMMAND ${CXXTEST_PERL_TESTGEN_EXECUTABLE})
this will no work any more: CXXTEST_PERL_TESTGEN_EXECUTABLE is not set.
The same problem if the code is:
find_package(CxxTest)
cxxtest_add_test(...) # perl used
add_custom_command(
OUTPUT ${myoutput}
COMMAND ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
because CXXTEST_PYTHON_TESTGEN_EXECUTABLE is not set.
Probably it's better to set both
CXXTEST_PERL_TESTGEN_EXECUTABLE
CXXTEST_PYTHON_TESTGEN_EXECUTABLE
independently from the actually used generator in the macro CXXTEST_ADD_TEST and provide, as the script already does, a variable with the used generator. So the user can let the macro choose and can also manually use the other generator.
Maybe I've misunderstood your code, am I right? |
|
|
(0021817)
|
Philip Lowman
|
2010-08-18 23:17
|
|
Yeah, that thought occurred to me too, the day after I uploaded the file. I will amend the code to always set both CXXTEST_PERL_TESTGEN_EXECUTABLE & CXXTEST_PYTHON_TESTGEN_EXECUTABLE. I'll post here when the code has been checked in. Thanks for the patch and opening the ticket. |
|
|
(0021855)
|
Philip Lowman
|
2010-08-19 21:47
|
|
Will be in 2.8.3
To git@cmake.org:stage/cmake.git
* [new branch] HEAD -> FindCxxTest_11041 |
|
|
(0022048)
|
Philip Lowman
|
2010-09-01 00:25
|
|
Reopening to set "Target Release" / "Fixed In Version" fields |
|
|
(0022049)
|
Philip Lowman
|
2010-09-01 00:27
|
|
|