[CMake] Generate XML Documentation (/doc) flag?

zkhan zamir.khan at gmail.com
Fri Mar 15 14:38:57 EDT 2013


I'm using CMake to build, amongst others, C++/CLI projects. I would like to
be able to set the "Generate XML Documentation Files" flag (Configuration
Properties > C/C++ > Output Files) for those projects. 

I was able to set the /clr flag earlier by just adding it manually and so I
tried the same thing for this flag:

# Flag to Generate XML Documentation
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /doc")

However, this doesn't seem to be enough for Visual Studio to generate the
file. If I set the actual option to "Yes", the XML file gets generated, but
just with the "/doc" flag, no XML file.

Taking a closer look, it seems that setting the option to Yes in Visual
Studio sets "GenerateXMLDocumentationFiles" to "true" in the .vcproj file.

Judging by this Google find, manageditk had to use some batch file magic to
overcome this issue:
http://code.google.com/p/manageditk/source/browse/trunk/FinishCMake.bat.in?r=11

Am I reduced to writing a post-CMake batch file to get this to work, or is
there a better way?






--
View this message in context: http://cmake.3232098.n2.nabble.com/Generate-XML-Documentation-doc-flag-tp7583697.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list