In a number of places in our build, we use compiled binaries via add_custom_command and friends to perform work during the compilation. For the most part we are able to successfully specify the target name used with add_executable in place of a full path to successfully tell CMake to run the locally built binary, but there's a corner case that's causing a bit of trouble.
We have locally built versions of several tools that might be found on some systems, but cannot be relied upon to be there in all cases (Windows, in particular, expands the set of "can't always depend on it being available" significantly.) In some build configurations we want to use our local verisons of these tools even when system versions are present (testing, making sure the version we use supports what we need, etc.). This is where we get into trouble - if the system version of our locally built tool is in the path, and the executable name matches the CMake target name, it looks as though the generated build files will use the system version in preference to the locally built version. Is this expected behavior, and if so is there a setting that can be set to make CMake prefer the local target over the system version in cases where both are present? It doesn't matter much when using systems like Make since I can supply the full path to the locally built target, but for multi-configuration systems like Visual Studio this path changes at build time, not CMake configure time. Any insight appreciated! CY
-- 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
