MantisBT - CMake
View Issue Details
0015654CMakeCMakepublic2015-07-15 13:352016-01-04 11:51
James Bigler 
 
normalfeatureN/A
closedsuspended 
 
 
0015654: Need generator expression CONFIG that works for both multi-config and single config generators
The value of $<CONFIG> works just fine for generators like Visual Studio (e.g. Debug, RelWithDebInfo), but for generators like Makefiles it maps to CMAKE_BUILD_TYPE, which is less useful for doing stuff like this:

file(GENERATE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>/myfile)

This will do the right thing for VS, but not for Makefile. It would be helpful to have such a value that could make this work.
No tags attached.
Issue History
2015-07-15 13:35James BiglerNew Issue
2015-07-15 13:41Brad KingNote Added: 0039148
2015-07-15 13:42Brad KingNote Added: 0039149
2015-07-15 13:42Brad KingStatusnew => resolved
2015-07-15 13:42Brad KingResolutionopen => suspended
2015-07-15 13:46James BiglerNote Added: 0039150
2016-01-04 11:51Robert MaynardNote Added: 0040094
2016-01-04 11:51Robert MaynardStatusresolved => closed

Notes
(0039148)
Brad King   
2015-07-15 13:41   
If you're trying to generate a script that goes next to a target's executable file then you should be able to do

 file(GENERATE OUTPUT $<TARGET_FILE_DIR:myexe>/myfile ...)
(0039149)
Brad King   
2015-07-15 13:42   
Design discussion belongs on the dev list with a larger audience, not in the issue tracker.
(0039150)
James Bigler   
2015-07-15 13:46   
This seems to rely on the presence of at least one executable. I'm generating a library, whose dll ends up in the RUNTIME path on Windows and in the LIBRARY path on Unix.
(0040094)
Robert Maynard   
2016-01-04 11:51   
Closing resolved issues that have not been updated in more than 4 months.