MantisBT - CMake
View Issue Details
0011283CMakeCMakepublic2010-09-30 22:232010-10-06 13:39
amir 
Brad King 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0011283: Visual Studio will treat text after linefeed inside custom build command comment as executable/batch file
Visual Studio 2010, but also most likely all versions using XML project files will not process linefeeds correctly. Instead of printing them VS will try and execute them as executables. If its an existing file that is not an executable Windows will ask what program to use to open the file.

Attached is a patch file fixing this for VS2010 only.

I do not have any other VS version installed, so I can not test them.

Here is what I found via Google:
http://www.mail-archive.com/cmake@cmake.org/msg01630.html [^]
add_custom_command(
    OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
    COMMAND ${CMAKE_COMMAND}
        -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html
        -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
        -P ${CMAKE_MODULE_PATH}/Html2C.cmake
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html
    COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
        from ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html"
    )

Will result in a project file containing:

<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">creating
    C:/temp/kicad/ash/pcbnew/dialog_freeroute_exchange_help_html.h
    from C:/temp/kicad/ash/pcbnew/dialog_freeroute_exchange_help.html</Message>

Visual Studio will only print "creating" to the output and then proceed to hand dialog_freeroute_exchange_help_html.h to the OS for opening.
comment, linefeed, multiline, visual studio 2010, vs2010
? cmake-patch (984) 2010-09-30 22:23
https://public.kitware.com/Bug/file/3424/cmake-patch
Issue History
2010-09-30 22:23amirNew Issue
2010-09-30 22:23amirFile Added: cmake-patch
2010-09-30 22:26amirTag Attached: comment
2010-09-30 22:26amirTag Attached: linefeed
2010-09-30 22:26amirTag Attached: multiline
2010-09-30 22:26amirTag Attached: visual studio 2010
2010-09-30 22:26amirTag Attached: vs2010
2010-10-01 12:27Bill HoffmanStatusnew => assigned
2010-10-01 12:27Bill HoffmanAssigned To => Brad King
2010-10-04 09:27Brad KingNote Added: 0022402
2010-10-04 09:28Brad KingStatusassigned => closed
2010-10-04 09:28Brad KingResolutionopen => fixed
2010-10-06 13:39David ColeFixed in Version => CMake 2.8.3
2010-10-06 13:39David ColeTarget Version => CMake 2.8.3
2010-10-06 13:39David ColeDescription Updated

Notes
(0022402)
Brad King   
2010-10-04 09:27   
Fixed:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2596e16c [^]