[CMake] SPECIFYING THE DEPENDENCY BETWEEN NON-C FILES

Oh K dmbmate at gmail.com
Wed Sep 28 08:50:53 EDT 2005


Kris and David,

I have checked and tried the documentation.  It works when I run the
commands with cmake 2.0.6, while it doesn't with cmake 2.2.1 beta.  I
had first tried it with cmake 2.2.1 beta and it continues to fail to
generate a proper Makefile as ADD_CUSTOM_COMMAND documentation says as
below:

In makefile terms this creates a new target in the following form:

  OUTPUT: MAIN_DEPENDENCY DEPENDS
          COMMAND

I personally prefer the new forms of the generated directories and
Makefiles by the version 2.2.1 beta to the forms by the previous
version.  However, it is still in beta and I may need to report this
as a bug and stay longer in the use of the version 2.0.6 yet until
cmake 2.2.1 becomes more complete.

Anyway, thank you for your helps and comments.

K Oh



2005/9/28, David Cole <david.cole at kitware.com>:
> See also:
> http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F
>
> Read the section in its entirety (if not the entire FAQ...)
>
> The very bottom of the section "How can I generate a source file during
> the build?" talks about what's necessary to generate a header and obtain
> proper dependencies.
>
>
> David
>
>
> Dekeyser, Kris wrote:
>
> >Hi,
> >
> >You should:
> >
> >ADD_CUSTOM_COMMAND(OUTPUT H-a.h COMMAND "T" ARGS F-a.txt H-a.h DEPENDS F-a.txt)
> >SET_SOURCE_FILES_PROPERTIES(H-a.h PROPERTIES GENERATED TRUE)
> >
> >And probably also:
> >
> >SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES H-a.h)
> >
> >HTH, Kris
> >
> >-----Original Message-----
> >From: Oh K [mailto:dmbmate at gmail.com]
> >Sent: Wednesday, 28 September, 2005 11:09
> >To: cmake at cmake.org
> >Subject: [CMake] SPECIFYING THE DEPENDENCY BETWEEN NON-C FILES
> >
> >Hello,
> >
> >I wonder if someone can help me with specifying the dependency rules
> >between inexistent files.
> >
> >The situation is as follows: A header file named 'H-a.h', is supposed
> >to be created by an extenal tool named T using the other file named
> >'F-a.txt' during the build process.  Of course, there is a c file
> >named 'C-a.c' dependant to 'H-a.h'.  I know there is a dependency
> >between 'H-a.h' and 'F-a.txt', while there is no such file, 'H-a.h'
> >before the beginning of a build.  I tried SET_SOURCE_FILES_PROPERTIES
> >like SET_SOURCE_FILES_PROPERTIES(H-a.h PROPERTIES OBJECT_DEPENDS
> >F-a.txt)'.  However, I continue to fail to generate a dependency rule
> >between these 2 files.  I think it does not work because the H-a.h is
> >not an object file.
> >
> >I wonder if there is some proper ways to create the dependency rule
> >between non-C files.
> >
> >K Oh
> >_______________________________________________
> >CMake mailing list
> >CMake at cmake.org
> >http://www.cmake.org/mailman/listinfo/cmake
> >+-+-+- Email Confidentiality Footer +-+-+-
> >Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not print, retain, copy nor disseminate this message or any part of it to anyone and you should notify the sender by reply email and destroy this message. Neglecting this clause could be a breach of confidence. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that are not related to the official business of my firm shall be understood as neither given nor endorsed by it.
> >_______________________________________________
> >CMake mailing list
> >CMake at cmake.org
> >http://www.cmake.org/mailman/listinfo/cmake
> >
> >
> >
> >
>
>


More information about the CMake mailing list