[cmake-developers] [CMake 0012226]: Case inconsistency between CMAKE_BUILD_TYPE and CMAKE_DEBUG_POSTFIX and alike. Inability to retrieve active postfix.
Mantis Bug Tracker
mantis at public.kitware.com
Wed May 25 17:58:01 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=12226
======================================================================
Reported By: Mikhail
Assigned To:
======================================================================
Project: CMake
Issue ID: 12226
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-05-25 17:58 EDT
Last Modified: 2011-05-25 17:58 EDT
======================================================================
Summary: 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 ..
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-05-25 17:58 Mikhail New Issue
======================================================================
More information about the cmake-developers
mailing list