I have a project configured by CMake that uses a macro to create an executable from a generated source file using code like the following:

macro(CreateProgram Name)
   set(SourceFile ${Name}.cpp)

   add_custom_command(OUTPUT ${SourceFile}
       COMMAND <Source code generation command>
       DEPENDS ${ARGN}
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

   add_executable(${Name} ${SourceFile} ${ARGN})
endmacro(CreateSourceFile)

ARGN is usually a list of header files the generated source code file will depend on. This macro works fine for make files on Linux and Visual Studio on Windows. However, with Xcode on Mac OS X, changes to the dependent header files will not cause the program to rebuild.

I suspect this is a bug with the way CMake is configuring the Xcode project. I wanted to check to see if there was anything I'm missing that would make things work.

What do people know about why this might be failing on Xcode?
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to