> 1) Is there a generic platform- and compiler-independent > way to specify > that you want to create a statically linked executable?
find /usr/share/cmake -type f | grep -E '\.cmake$' | xargs grep -i -n -H '\-static' No matches == there is no cross-platform way to specify that you want static exectuable. I think this is a bug, but since, we are talking about static executables, you may want to read http://people.redhat.com/drepper/no_static_linking.html In general, linking statically is a very bad idea. Moreover, if your code is not GPL, you're not allowed to link against libc/libgcc statically. It is direct GPL violation. > 2) How can I persuade find_library() to only search for > static > libraries? You don't need to. -static option for gcc will make the trick and gcc will automatically pick *.a instead of *.so, if it exists. _______________________________________________ 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