I like the idea of making it a post build event, however I&#39;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&#39;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} &quot;${CMAKE_SOURCE_DIR}/tools/dot&quot; )</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 &quot;-E environment&quot;? What would you recommend? Note that these environment variables aren&#39;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">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</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 &quot;Use Doxygen to create the HTML based API documentation&quot; OFF)<br>
if(MXA_BUILD_API_DOCS)<br>
  FIND_PACKAGE(Doxygen)<br>
  if (NOT DOXYGEN_FOUND)<br>
    message(FATAL_ERROR &quot;Doxygen is needed to build the documentation.&quot;)<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&#39;ve currently been running doxygen through execute_process() in CMAKE. I&#39;ve set it up like this:<br>
<br>
<br>
        find_package( Doxygen REQUIRED )<br>
<br>
        execute_process(<br>
            COMMAND &quot;${DOXYGEN_EXECUTABLE}&quot; &quot;${cmake_includes}/project.dox&quot;<br>
            WORKING_DIRECTORY &quot;${documentation_dir}&quot;<br>
            OUTPUT_FILE &quot;${documentation_dir}/doxygen_log.txt&quot;<br>
            ERROR_FILE &quot;${documentation_dir}/doxygen_log.txt&quot;<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 &quot;output&quot; occurred before a specific &quot;error&quot;, 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>