MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013608 | CMake | CMake | public | 2012-10-25 11:26 | 2013-03-04 08:38 |
Reporter | Derek Bruening | ||||
Assigned To | David Cole | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Visual Studio 2008 | OS | Windows | OS Version | |
Product Version | CMake 2.8.9 | ||||
Target Version | CMake 2.8.10 | Fixed in Version | CMake 2.8.10 | ||
Summary | 0013608: execute_process() run from add_custom_command() via cmake -P fails to capture output for VS2008 | ||||
Description | in my project I have a post-build custom command: add_custom_command(TARGET dynamorio POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -D lib=${drout} -D DUMPBIN_EXECUTABLE=${DUMPBIN_EXECUTABLE} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake_checkdeps.cmake VERBATIM) where CMake_checkdeps.cmake is: -------------------------------- execute_process(COMMAND ${DUMPBIN_EXECUTABLE} /dependents "${lib}" RESULT_VARIABLE deps_result ERROR_VARIABLE deps_error OUTPUT_VARIABLE deps_out ) if (deps_result OR deps_error) message(FATAL_ERROR "*** ${DEPS_EXECUTABLE} failed: ***\n${deps_error}") endif (deps_result OR deps_error) string(REGEX MATCH "following dependencies:.*Summary" dlls "${deps_out}") string(REGEX REPLACE "\r?\n" "" dlls "${dlls}") string(REGEX REPLACE "following dependencies: *" "" dlls "${dlls}") string(REGEX REPLACE " *Summary" "" dlls "${dlls}") if (NOT dlls MATCHES "^ntdll.dll$") message(FATAL_ERROR "*** Error: ${lib} depends on more than ntdll.dll: ${dlls}") endif () ---------------------------- This all works fine with VS2010. However, with VS2008, the output of dumpbin.exe is not captured and is instead printed out to the console/shell. The deps_error and deps_out variables are both empty. If I run this custom_command at config time, it works fine. If I run the script through cmake -P it works fine whether from cmd or a cygwin rxvrt shell: % cmake.exe -D lib=C:/src/dr/git/build_x86_dbg/lib32/debug/dynamorio.dll -D "DUMPBIN_EXECUTABLE=C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/dumpbin.exe" -P C:/src/dr/git/src/core/CMake_checkdeps.cmake But when VS2008 runs the command, it fails due to not capturing the output. The line in the .vcproj file is: <Tool Name="VCPostBuildEventTool" CommandLine="C:\PROGRA~2\CMAKE2~1.8\bin\cmake.exe -D lib=C:/src/dr/git/build_x86_dbg/lib32/debug/dynamorio.dll -D "DUMPBIN_EXECUTABLE=C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/dumpbin.exe" -P C:/src/dr/git/src/core/CMake_checkdeps.cmake
if errorlevel 1 goto :VCReportError"/> If I substitute "cl.exe /help" for "dumpbin.exe ..." the same problem is there: the output is not captured. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | closed, resolved | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-10-25 11:26 | Derek Bruening | New Issue | |||
2012-10-25 11:51 | Brad King | Note Added: 0031324 | |||
2012-10-25 11:53 | David Cole | Note Added: 0031325 | |||
2012-10-25 12:32 | Derek Bruening | Note Added: 0031326 | |||
2012-10-25 12:33 | Derek Bruening | Tag Attached: closed | |||
2012-10-25 12:33 | Derek Bruening | Tag Attached: resolved | |||
2012-10-25 12:35 | Derek Bruening | Note Added: 0031327 | |||
2012-10-25 12:43 | David Cole | Assigned To | => David Cole | ||
2012-10-25 12:43 | David Cole | Status | new => assigned | ||
2012-10-25 12:43 | David Cole | Note Added: 0031328 | |||
2012-10-25 12:43 | David Cole | Status | assigned => resolved | ||
2012-10-25 12:43 | David Cole | Fixed in Version | => CMake 2.8.10 | ||
2012-10-25 12:43 | David Cole | Resolution | open => no change required | ||
2012-10-25 12:43 | David Cole | Target Version | => CMake 2.8.10 | ||
2012-10-25 12:43 | David Cole | Description Updated | bug_revision_view_page.php?rev_id=873#r873 | ||
2013-03-04 08:38 | Robert Maynard | Note Added: 0032488 | |||
2013-03-04 08:38 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|