Lets say I have a CMakeLists.txt that looks like this
find_library(FOO foo /tmp/a /tmp/b)
add_executable(bar bar.c)
target_link_libraries(bar ${FOO})
add_test(test_bar bar)
then I run cmake, FOO is filled in with the located library from /tmp/b, and
I run make all;make test. All is good. If I change /tmp/b/libfoo.a then when
I run make test the executable is relinked before I execute it. All is good
again.
Now lets say a newer copy of the library appears in /tmp/a.
When I run make test, what I'd like to happen is that we notice it has
appeared, and relink against it because we prefer to use /tmp/a/libfoo.a if
it exists (hence the order in the find_library).
Is there a way to make that happen? I think if I wrote a raw makefile I
could do this with vpaths or somesuch and still get the dependency checking
ok. Is there a way with cmake?
Thanks
b.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake