I like the idea of making it a post build event, however I'm doing certain things that you are not that will be more difficult to support outside of CMake.<div><br></div><div>For example, I set certain environment variables that are accessed by the Doxyfile (This is legal in Doxygen). I'm currently doing this above my call to execute_process():</div>
<div><div><br></div><div> set( ENV{project_name} ${project_name} )</div><div> set( ENV{include_dir} ${include_path} )</div><div> set( ENV{source_dir} ${source_path} )</div><div> set( ENV{dot_path} "${CMAKE_SOURCE_DIR}/tools/dot" )</div>
<div> set( ENV{UNCOMMON_STRIP_PATH} ${CMAKE_SOURCE_DIR} )</div><div><br></div><div>How am I supposed to do this? Would I have one add_custom_command() for each, and invoke ${CMAKE_COMMAND} with "-E environment"? What would you recommend? Note that these environment variables aren't permanent. They only last the lifetime of the executing process and are available to any child processes (i.e. available to the doxygen child process. Visual Studio would be the parent process).</div>
</div><div><br><br><div class="gmail_quote">On Thu, Mar 26, 2009 at 11:31 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
option(MXA_BUILD_API_DOCS "Use Doxygen to create the HTML based API documentation" OFF)<br>
if(MXA_BUILD_API_DOCS)<br>
FIND_PACKAGE(Doxygen)<br>
if (NOT DOXYGEN_FOUND)<br>
message(FATAL_ERROR "Doxygen is needed to build the documentation.")<br>
endif()<br>
configure_file(${MXA_RESOURCES_DIR}/<a href="http://MXADataModel.doxyfile.in" target="_blank">MXADataModel.doxyfile.in</a><br>
${MXADataModel_BINARY_DIR}/MXADataModel.doxyfile @ONLY IMMEDIATE)<br>
add_custom_command(TARGET ${MXADATAMODEL_LIB_NAME}<br>
POST_BUILD<br>
COMMAND ${DOXYGEN_EXECUTABLE} ${MXADataModel_BINARY_DIR}/MXADataModel.doxyfile)<br>
<br>
endif(MXA_BUILD_API_DOCS)<br>
<br>
<br>
The above is how I invoke doxygen.<br>
_________________________________________________________<br>
Mike Jackson <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer Dayton, Ohio<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Mar 26, 2009, at 12:23 PM, Robert Dailey wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hi,<br>
<br>
I've currently been running doxygen through execute_process() in CMAKE. I've set it up like this:<br>
<br>
<br>
find_package( Doxygen REQUIRED )<br>
<br>
execute_process(<br>
COMMAND "${DOXYGEN_EXECUTABLE}" "${cmake_includes}/project.dox"<br>
WORKING_DIRECTORY "${documentation_dir}"<br>
OUTPUT_FILE "${documentation_dir}/doxygen_log.txt"<br>
ERROR_FILE "${documentation_dir}/doxygen_log.txt"<br>
)<br>
<br>
However, this does not work. Doxygen is never run and the doxygen_log.txt file has no contents. When I make OUTPUT_FILE and ERROR_FILE reference 2 different file names, it works fine. However, I want stderr and stdout to both output to the same file in the proper order. It is important that I see what "output" occurred before a specific "error", and I cannot do this if they are in 2 different files.<br>
<br>
How can I make this work?<br></div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
<br>
</blockquote></div><br></div>