MantisBT - CMake
View Issue Details
0009163CMakeCMakepublic2009-06-16 12:092009-10-29 09:27
Alexandre Feblot 
Brad King 
normalfeatureN/A
closedfixed 
MSVC
CMake-2-6 
 
0009163: A way to set different output paths for MSVC Debug/Release configurations
Could you please create new XXXXX_<CONFIG> variables and properties to set different paths on MSVC according to the build configuration, so that we can get rid of the currently mandatory /Debug or /Release subdirectory.

Variables:
  - CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
  - CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
  - CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG>

Properties:
  - RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
  - and so on...

Thanks
No tags attached.
has duplicate 0008243closed David Cole Users cannot adequately control where Visual Studio writes its output files 
has duplicate 0008555closed  Ability to generate targets outside of Visual Studio's "Release" or "Debug" folders 
related to 0010276closed Bill Hoffman PREFIX "..\" hack does not work for VisualStudio 10.0 any more 
related to 0010040closed David Cole VS2010 generator does not handle project names containing periods ('.') 
Issue History
2009-06-16 12:09Alexandre FeblotNew Issue
2009-06-16 12:46Brad KingStatusnew => assigned
2009-06-16 12:46Brad KingAssigned To => Brad King
2009-10-28 13:39Brad KingNote Added: 0018257
2009-10-28 14:19David ColeRelationship addedhas duplicate 0008243
2009-10-28 14:26Brad KingRelationship addedhas duplicate 0008555
2009-10-29 09:27Brad KingNote Added: 0018272
2009-10-29 09:27Brad KingNote Added: 0018273
2009-10-29 09:27Brad KingStatusassigned => closed
2009-10-29 09:27Brad KingResolutionopen => fixed
2010-02-11 13:07Bill HoffmanRelationship addedrelated to 0010276
2010-12-17 12:40Brad KingRelationship addedrelated to 0010040

Notes
(0018257)
Brad King   
2009-10-28 13:39   
First, some cleanup:

  Fix Xcode <= 2.0 projects with CMAKE_BUILD_TYPE
  /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v <-- Source/cmGlobalXCodeGenerator.cxx
  new revision: 1.239; previous revision: 1.238

  Consolidate duplicate documentation in cmTarget
  /cvsroot/CMake/CMake/Source/cmTarget.cxx,v <-- Source/cmTarget.cxx
  new revision: 1.283; previous revision: 1.282

Next, fix Xcode and VS 6 generators to use per-configuration target dirs:

  Keep Xcode intermediate files away from output dir
  /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v <-- Source/cmGlobalXCodeGenerator.cxx
  new revision: 1.238; previous revision: 1.237

  Use per-config output dir in VS 6 templates
  /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v <-- Source/cmLocalVisualStudio6Generator.cxx
  new revision: 1.162; previous revision: 1.161
  /cvsroot/CMake/CMake/Templates/DLLHeader.dsptemplate,v <-- Templates/DLLHeader.dsptemplate
  new revision: 1.31; previous revision: 1.30
  /cvsroot/CMake/CMake/Templates/EXEHeader.dsptemplate,v <-- Templates/EXEHeader.dsptemplate
  new revision: 1.26; previous revision: 1.25
  /cvsroot/CMake/CMake/Templates/EXEWinHeader.dsptemplate,v <-- Templates/EXEWinHeader.dsptemplate
  new revision: 1.26; previous revision: 1.25
  /cvsroot/CMake/CMake/Templates/staticLibHeader.dsptemplate,v <-- Templates/staticLibHeader.dsptemplate
  new revision: 1.23; previous revision: 1.22

  Create a static library's output dir for VS 6
  /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v <-- Source/cmLocalVisualStudio6Generator.cxx
  new revision: 1.163; previous revision: 1.162
  /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.h,v <-- Source/cmLocalVisualStudio6Generator.h
  new revision: 1.27; previous revision: 1.26

Finally, introduce the properties/variables themselves, and a test:

  Introduce per-config OUTPUT_DIRECTORY properties
  /cvsroot/CMake/CMake/Source/cmTarget.cxx,v <-- Source/cmTarget.cxx
  new revision: 1.284; previous revision: 1.283

  Test per-config OUTPUT_DIRECTORY properties
  /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v <-- Tests/CMakeLists.txt
  new revision: 1.142; previous revision: 1.141
  /cvsroot/CMake/CMake/Tests/OutDir/CMakeLists.txt,v <-- Tests/OutDir/CMakeLists.txt
  initial revision: 1.1
  /cvsroot/CMake/CMake/Tests/OutDir/OutDir.c,v <-- Tests/OutDir/OutDir.c
  initial revision: 1.1
  /cvsroot/CMake/CMake/Tests/OutDir/OutDir.cmake,v <-- Tests/OutDir/OutDir.cmake
  initial revision: 1.1
(0018272)
Brad King   
2009-10-29 09:27   
One more change to fix the OUTPUT_DIRECTORY property test:

  Fix OutDir test on HP, MinGW, and Cygwin
  /cvsroot/CMake/CMake/Tests/OutDir/OutDir.cmake,v <-- Tests/OutDir/OutDir.cmake new revision: 1.2; previous revision: 1.1
(0018273)
Brad King   
2009-10-29 09:27   
This feature is now implemented and the test passes everywhere. It will be included in a future 2.8.x release.