[cmake-developers] [CMake 0011950]: install.cmake file assumes RELEASE install

Mantis Bug Tracker mantis at public.kitware.com
Wed Mar 9 11:24:58 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11950 
====================================================================== 
Reported By:                Ben Hines
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11950
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-03-09 11:24 EST
Last Modified:              2011-03-09 11:24 EST
====================================================================== 
Summary:                    install.cmake file assumes RELEASE install
Description: 
Hi,

Used CMake to generate make files for a static library on linux.  In my
CMakeLists.txt file, I added a line for setting debug postfix as "d".  I have
generated makefiles with CMake for both the debug and release configs.  They
"make" correctly, resulting in mylib.lib and mylibd.lib for release and debug. 
However, when I go to the debug build area and type "make install" it always
attempts to install the "release" version.  In fact, if I haven't yet built the
release configuration, then "make install" (from the debug config) fails because
it can't find mylib.lib.

I noticed in the generated install.cmake file, that there is a condition on the
CMAKE_INSTALL_CONFIG_NAME variable.  If I explicitly set this to "Debug" in the
install.cmake file, it works correctly and copies "mylibd.lib" to the install
directory.  This, unfortunately, isn't a solution because my edits to
install.cmake are wiped out the next time I generate the file. 

When running cmake to generate the debug build, I tried using the "-D" option to
define the CMAKE_INSTALL_CONFIG_NAME to be debug as follows:

-DCMAKE_INSTALL_CONFIG_NAME:STRING=Debug

I verified in the resultant CMakeCache.txt that the variable is set and it is. 
However, when I run "make install" it still tries to install the release
library.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-09 11:24 Ben Hines      New Issue                                    
======================================================================




More information about the cmake-developers mailing list