You are touching an existing header file...<div><br></div><div>What happens if you add a new header file that was not there the first time you ran make install?</div><div><br><br><div class="gmail_quote">On Wed, Oct 28, 2009 at 2:26 PM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, Oct 28, 2009 at 01:18:55PM -0400, David Cole wrote:<br>
> Except: that argument is not valid in this case. Neither file(GLOB nor<br>
> install(DIRECTORY will "rerun" anything if a new header file is added into<br>
> the directory...<br>
<br>
</div>David I don't think this is correct.<br>
<br>
Here's a test using file(GLOB) + install(FILES):<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ cat ../CMakeLists.txt<br>
cmake_minimum_required(VERSION 2.6)<br>
project (test)<br>
<br>
set (CMAKE_INSTALL_PREFIX "/tmp/install.test.tmr")<br>
<br>
file (GLOB header_files "include/*.h")<br>
install (FILES ${header_files} DESTINATION include)<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ cmake ..<br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to:<br>
/alta/tylermr/install-dir-vs-file-glob-test/b<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ make install<br>
Install the project...<br>
-- Install configuration: ""<br>
-- Installing: /tmp/install.test.tmr/include/foo.h<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ touch ../include/bar.h<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ make install<br>
Install the project...<br>
-- Install configuration: ""<br>
-- Up-to-date: /tmp/install.test.tmr/include/foo.h<br>
<br>
<br>
Note that CMake does not notice the addition of bar.h.<br>
<br>
<br>
Here's a test using install(DIRECTORY):<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ cat ../CMakeLists.txt<br>
cmake_minimum_required(VERSION 2.6)<br>
project (test)<br>
<br>
set (CMAKE_INSTALL_PREFIX "/tmp/install.test.tmr")<br>
<br>
install (DIRECTORY include DESTINATION include)<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ make install<br>
Install the project...<br>
-- Install configuration: ""<br>
-- Installing: /tmp/install.test.tmr/include/include<br>
-- Installing: /tmp/install.test.tmr/include/include/foo.h<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ touch ../include/bar.h<br>
<br>
[tylermr@alta:~/install-dir-vs-file-glob-test/b]$ make install<br>
Install the project...<br>
-- Install configuration: ""<br>
-- Installing: /tmp/install.test.tmr/include/include<br>
-- Up-to-date: /tmp/install.test.tmr/include/include/foo.h<br>
-- Installing: /tmp/install.test.tmr/include/include/bar.h<br>
<br>
<br>
Note that bar.h is noticed and installed.<br>
<font color="#888888"><br>
<br>
tyler<br>
</font></blockquote></div><br></div>