[CMake] Getting Makefiles sensitive tonew/deleted files/directories?
blinkeye
gentoo at blinkeye.ch
Wed Mar 19 17:03:24 EDT 2008
On 03/19/2008 09:50 PM, Ken Martin wrote:
> Can you do the glob, configure the result out to a file, then INCLUDE
that
> file. I believe that will solve the problem. Something like
>
> file(GLOB SRC *.cpp)
> configure_file(somefile.in somefile)
> include(somefile)
>
> where somefile.in looks like
>
> # list of files as a comment -- ${SRC}
>
> This works because CMake does check (at make time) to see if any included
> file in CMake has changed but is smart in that configure_file only writes
> the file if it has changed. I'm pretty sure something like that will
work.
>
> Ken
Could you be a bit more specific on how to include a file with listed
source files or actually in which format such a file has to be? I tried
that but it didn't work for me. Alex was suggesting this solution a
while back where packadal was asking about "build shared library from
static libraries":
> You have to set them in the parent directory or set them ibn a file in the
> subdir which is then INCLUDE()d in the parent directory (use full paths
> then)
More information about the CMake
mailing list