[CMake] SPECIFYING THE DEPENDENCY BETWEEN NON-C FILES

Ken Martin ken.martin at kitware.com
Fri Sep 30 16:28:41 EDT 2005


Can you send me a small sample project CMakeLists.txt file so I can try
reproducing this? 

Thanks
Ken

> -----Original Message-----
> From: cmake-bounces+ken.martin=kitware.com at cmake.org [mailto:cmake-
> bounces+ken.martin=kitware.com at cmake.org] On Behalf Of Oh K
> Sent: Wednesday, September 28, 2005 7:51 AM
> To: David Cole
> Cc: cmake at cmake.org; Dekeyser, Kris
> Subject: Re: [CMake] SPECIFYING THE DEPENDENCY BETWEEN NON-C FILES
> 
> 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_durin
> g_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
> > >
> > >
> > >
> > >
> >
> >
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list