On 11/15/2011 1:24 PM, David Cole wrote:
On Tue, Nov 15, 2011 at 1:19 PM, Alexander Neundorf<neund...@kde.org> wrote:
function(check_for_file _file _target)
if(NOT EXISTS _file)
message(FATAL_ERROR "... long error message...")
endfunction()
check_for_file(libFoo123.so Foo)
...
check_for_file(libBar123.so Bar)
>>
> I think the function approach is reasonable...
I don't like the overhead of a function.
Or I could collect the files and targets together, but then the error message
becomes less straigh forward.
You don't need the error message to do all the files at once. Just use
a foreach() to test them one at a time. Die on the first missing one.
-Brad
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers