MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008226 | CMake | CMake | public | 2008-12-04 17:50 | 2015-03-02 08:57 | |||||
Reporter | Bill Hoffman | |||||||||
Assigned To | Bill Hoffman | |||||||||
Priority | normal | Severity | feature | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake-2-6 | |||||||||
Target Version | Fixed in Version | CMake 3.1 | ||||||||
Summary | 0008226: if expansion of quoted arguments as variables should be deprecated | |||||||||
Description | If you have if("foo" MATCHES "foo" ) cmake will look for a variable foo and if there happens to be found it will replace the string. This causes unexpected things to happen. Brad suggests: We can do it with a policy, but it won't be too bad if we do it right. I doubt too much code writes if("${foo}") where the value of foo is another variable name to be tested. Similarly, I doubt much code writes if("foo") where it intends the variable 'foo' to be tested. The ambiguous cases are mostly when no quotes are used. Unlike other commands, the IF command is invoked directly with the std::vector<cmListFileArgument> list of arguments. Each one has a boolean indicating whether it was actually quoted or not. We can make the policy say that if real quotes were given by the caller then to treat it as a string and never a variable. Without quotes, the old behavior can stay. | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2008-12-04 17:50 | Bill Hoffman | New Issue | ||||||||
2008-12-04 17:51 | Bill Hoffman | Status | new => assigned | |||||||
2008-12-04 17:51 | Bill Hoffman | Assigned To | => Bill Hoffman | |||||||
2008-12-04 18:36 | mwoehlke | Note Added: 0014293 | ||||||||
2010-11-30 16:26 | James Bigler | Relationship added | related to 0008823 | |||||||
2011-11-30 17:20 | Andreas Schuh | Note Added: 0027875 | ||||||||
2011-12-02 15:01 | Aaron C. Meadows | Note Added: 0027899 | ||||||||
2013-10-23 07:43 | jzarl | Note Added: 0034224 | ||||||||
2013-10-23 07:46 | jzarl | Note Edited: 0034224 | bug_revision_view_page.php?bugnote_id=34224#r1297 | |||||||
2014-09-16 07:16 | Nils Gladitz | Note Added: 0036813 | ||||||||
2014-09-16 07:16 | Nils Gladitz | Status | assigned => resolved | |||||||
2014-09-16 07:16 | Nils Gladitz | Fixed in Version | => CMake 3.1 | |||||||
2014-09-16 07:16 | Nils Gladitz | Resolution | open => fixed | |||||||
2015-03-02 08:57 | Robert Maynard | Note Added: 0038123 | ||||||||
2015-03-02 08:57 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|