View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0010065 | CMake | Modules | public | 2009-12-18 11:48 | 2015-05-04 10:06 | ||||
Reporter | rtward | ||||||||
Assigned To | Philip Lowman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0010065: FindGTest.cmake doesn't handle spaces around arguments to TEST / TEST_F macro | ||||||||
Description | The FindGTest.cmake module expects the GTest macro to have the format: TEST(test_case,test_name) or TEST_F(test_case,test_name) and it fails if there is any space padding between the arguments like this: TEST( test_case, test_name ) or TEST_F( test_case, test_name ) I've provided a patch that I believe fixes the problem. It changes line 79 of FindGTest.cmake from: string(REGEX REPLACE ".*\\(([A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+)\\).*" "\\1.\\2" test_name ${hit}) to string(REGEX REPLACE ".*\\(( *[A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit}) adding in regex elements that will catch leading and trailing spaces that pad the macro arguments. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0018949) rtward (reporter) 2009-12-18 17:50 |
Noticed a bug, the corrected line should be: string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit}) |
(0019031) Philip Lowman (developer) 2010-01-05 00:17 |
Thanks for the patch, fixed in CVS. Also documented the fact that CMake must be manually rerun after adding/removing tests as part of the source file. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-12-18 11:48 | rtward | New Issue | |
2009-12-18 11:48 | rtward | File Added: FindGTest_fix.diff | |
2009-12-18 17:50 | rtward | Note Added: 0018949 | |
2010-01-05 00:17 | Philip Lowman | Note Added: 0019031 | |
2010-01-05 00:17 | Philip Lowman | Assigned To | => Philip Lowman |
2010-01-05 00:17 | Philip Lowman | Status | new => resolved |
2010-01-05 00:17 | Philip Lowman | Resolution | open => fixed |
2010-01-05 01:00 | Philip Lowman | Status | resolved => feedback |
2010-01-05 01:00 | Philip Lowman | Resolution | fixed => reopened |
2010-01-05 01:01 | Philip Lowman | Status | feedback => resolved |
2010-01-05 01:01 | Philip Lowman | Resolution | reopened => fixed |
2010-01-05 01:01 | Philip Lowman | Category | CMake => Modules |
2010-09-01 00:13 | Philip Lowman | Status | resolved => closed |
2015-05-04 10:06 | Brad King | Relationship added | related to 0015553 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |