View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012226 | CMake | CMake | public | 2011-05-25 17:58 | 2016-06-10 14:31 | ||||
Reporter | Mikhail Titov | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | Windows | OS | Windows XP SP3 | OS Version | |||||
Product Version | CMake 2.8.4 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0012226: Case inconsistency between CMAKE_BUILD_TYPE and CMAKE_DEBUG_POSTFIX and alike. Inability to retrieve active postfix. | ||||||||
Description | While default build type is Debug, postfix should be specified using DEBUG configuration name. There is no effect if CMAKE_Debug_POSTFIX is used with default configuration settings. This results in the necessity to specify explicitly build type as DEBUG for ${CMAKE_${CMAKE_BUILD_TYPE}_POSTFIX} to work. This kind of constructions is necessary to retrieve active postfix that can be used with gendef tool to generate symbol table in custom command. | ||||||||
Steps To Reproduce | if (MSVC80) set (CMAKE_DEBUG_POSTFIX "-vc80-d") set (CMAKE_RELEASE_POSTFIX "-vc80") set(EXTRA "MSVC_Net2005") elseif (MSVC90) set (CMAKE_DEBUG_POSTFIX "-vc90-d") set (CMAKE_RELEASE_POSTFIX "-vc90") set(EXTRA "MSVC_Net2008") elseif (MSVC10) set (CMAKE_DEBUG_POSTFIX "-vc100-d") set (CMAKE_RELEASE_POSTFIX "-vc100") set(EXTRA "MSVC_Net2010") endif (MSVC80) set(POSTFIX ${CMAKE_${CMAKE_BUILD_TYPE}_POSTFIX}) message("Postfix is ${POSTFIX}") Will result in an empty POSTFIX, though correct postfix is applied. If we replace DEBUG to Debug everywhere, no postfix will be applied for default build. | ||||||||
Additional Information | By default build I mean something like cmake .. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0026611) Michael Wild (reporter) 2011-05-26 01:12 |
In your build systems it usually is a bad idea to use the variable CMAKE_BUILD_TYPE, because for multi-config IDE's (such as Xcode or Visual Studio) it is undefined. Also, something simple as string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE) will give you an upper-cased string. |
(0026625) Mikhail Titov (reporter) 2011-05-26 13:54 |
Thanks for that tip! Indeed I'm just using nmake/jom since I'm adopting 3rd party libraries to CMake. But what would be a general solution that will work with IDEs as well? I need full target name to supply to gendef tool. |
(0030259) David Cole (manager) 2012-08-11 11:09 |
Sending old, never assigned issues to the backlog. (The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...) If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^] It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing. |
(0041842) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-05-25 17:58 | Mikhail Titov | New Issue | |
2011-05-26 01:12 | Michael Wild | Note Added: 0026611 | |
2011-05-26 13:54 | Mikhail Titov | Note Added: 0026625 | |
2012-08-11 11:09 | David Cole | Status | new => backlog |
2012-08-11 11:09 | David Cole | Note Added: 0030259 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0041842 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |