[PATCH] D30467: Use relative path to clang-cl

Brad King via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 11:46:36 PST 2017


brad.king added a comment.

If the CMAKE_C_COMPILER value is not provided to CMake then its logic for initializing it is part of the enable-language logic done inside the `project` or `enable_language` command.  Therefore in general project code should not try to touch it.

CMAKE_C_COMPILER is also not something that all generators support having set in the cache.  The VS IDE and Xcode generators just provide the value for reference but do not use it during generation.

If the CMAKE_C_COMPILER value is provided to CMake and one is using a generator that allows this (Makefile, Ninja) then it is expected to use forward slashes currently.  However, our `_cmake_find_compiler_path` macro is always called when CMAKE_C_COMPILER is externally provided in order to make sure we can find its absolute path.  Perhaps that could be taught to use `file(TO_CMAKE_PATH)` too.  Patch welcome!


https://reviews.llvm.org/D30467





More information about the llvm-commits mailing list