View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015879 | CMake | CMake | public | 2015-12-11 16:56 | 2016-05-02 08:30 | ||||
Reporter | Javier Martinez | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | unable to reproduce | ||||||
Platform | Windows | OS | Windows | OS Version | 7 | ||||
Product Version | CMake 3.4.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015879: Wrong configuration name emitted by generator expression | ||||||||
Description | CMake has issues with the $<CONFIG> and $<CONFIG:name> generator expressions when one configuration name is a substring of another. The attached reproducer has Debug, Release and ReleaseInternal as the configuration names. In this case ReleaseInternal is used instead of Release. | ||||||||
Steps To Reproduce | - Generate solution (I placed the CMakeLists/txt file in the /bin folder and used cmake.exe . to generate the solution) - Open the generated solution Test.sln - Open the properties for TestProject -> CMake Rules ->stamp.txt.rule - Click on Configuration Properties -> Custom Build Tools -> General - On Configuration select Release - Inspect the Command Line property, it reads "Printing comment for ReleaseInternal" instead of "Printing comment for Release" | ||||||||
Additional Information | Tested with CMake version cmake-3.4.1-win32-x86 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() ![]() ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0039978) Brad King (manager) 2015-12-14 08:46 |
With CMake 3.4.1 and the VS 2015 generator I get the expected content in the .vcxproj file: $ grep -B 1 'Printing comment' TestProject.vcxproj <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -E echo Printing comment for Debug -- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -E echo Printing comment for Release -- <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseInternal|Win32'">setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -E echo Printing comment for ReleaseInternal I also see the proper output at build time: $ cmake --build . --config Release --target TestProject ... Printing comment for Release $ cmake --build . --config ReleaseInternal --target TestProject ... Printing comment for ReleaseInternal |
(0039986) Javier Martinez (reporter) 2015-12-15 14:14 |
I can confirm that the correct output is printed when I compile with the VS 2013 IDE. However, if the command is inspected in the IDE as the reproduction steps indicate the wrong command is displayed. Is this a CMake or a VS issue? |
(0039993) Brad King (manager) 2015-12-17 08:28 |
If the correct output is generated by the build, and the correct content appears in the .vcxproj file, then this is almost certainly a VS issue. CMake is generating the proper content into the file. If you do try to report this to MS, please first reproduce it in .vcxproj file created purely through VS and not with CMake. That will make it clearer. |
(0040986) Robert Maynard (manager) 2016-05-02 08:30 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-12-11 16:56 | Javier Martinez | New Issue | |
2015-12-11 16:56 | Javier Martinez | File Added: CMakeLists.txt | |
2015-12-14 08:46 | Brad King | Note Added: 0039978 | |
2015-12-15 08:47 | Brad King | Status | new => resolved |
2015-12-15 08:47 | Brad King | Resolution | open => unable to reproduce |
2015-12-15 14:13 | Javier Martinez | File Added: CMake_0015879_1.png | |
2015-12-15 14:14 | Javier Martinez | Note Added: 0039986 | |
2015-12-17 08:28 | Brad King | Note Added: 0039993 | |
2016-05-02 08:30 | Robert Maynard | Note Added: 0040986 | |
2016-05-02 08:30 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |