View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013576CMakeCMakepublic2012-10-05 17:142013-03-04 08:38
ReporterAnders Elfgren 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformVisual Studio 2012 ProfessionalOSWindowsOS Version7
Product VersionCMake 2.8.9 
Target VersionFixed in Version 
Summary0013576: Empty CMAKE_BUILD_TYPE in VS2012
DescriptionAs part of my build step I'm copying a dll into a project's build folder like this:

ADD_CUSTOM_COMMAND(
    TARGET MyProject
    POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy ${DataLibrary_BINARY_DIR}/Release/DataLibrary.dll ${MyProject_BINARY_DIR}/${CMAKE_BUILD_TYPE}/datalibrary.dll
)

But the commands ends up looking like:

C:/work/pd_engine/local/cmake/vs2012/external/datalibrary/Release/DataLibrary.dll C:/work/pd_engine/local/cmake/vs2012/units/myproject//datalibrary.dll

Notice the //.
Steps To ReproduceI assume this should happen at all times and as such should be easy to reproduce by simply trying to use CMAKE_BUILD_TYPE together with VS11.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0031184)
Rolf Eike Beer (developer)
2012-10-05 17:45

Multi-configuration generators like MSVC do not have CMAKE_BUILD_TYPE available in this way. Maybe just set OUTPUT_DIRECTORY properties?
(0031187)
Anders Elfgren (reporter)
2012-10-05 18:44

Oh, really? I could have sworn that it worked with VS2010, but I could be wrong. If this is the case, I can look into other means of doing the same thing.
(0031190)
Brad King (manager)
2012-10-06 10:00

From the documentation of CMAKE_BUILD_TYPE:

 http://www.cmake.org/cmake/help/v2.8.9/cmake.html#variable:CMAKE_BUILD_TYPE [^]
 "This variable is only supported for make based generators."

See comment 0009974:0029033 for an example of copying DLLs.
(0032469)
Robert Maynard (manager)
2013-03-04 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-10-05 17:14 Anders Elfgren New Issue
2012-10-05 17:45 Rolf Eike Beer Note Added: 0031184
2012-10-05 18:44 Anders Elfgren Note Added: 0031187
2012-10-06 10:00 Brad King Note Added: 0031190
2012-10-06 10:00 Brad King Status new => resolved
2012-10-06 10:00 Brad King Resolution open => no change required
2013-03-04 08:38 Robert Maynard Note Added: 0032469
2013-03-04 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team