Running from a path with lowercase drive letter causes misconfigured project files
It appears that when attempting to run cmake.exe from a path with a lower-case drive letter present it will fail to load settings from "shared/cmake-*/Modules". This was observed when attempting to generate the AWS C++ SDK project files and results in a misconfigured project file where some libraries are missing their ".lib" file extension. This then causes the MSVC linker to assume a file extension of ".obj" and fail.
Reproduce notes (Windows and VS2015):
- Download the AWS SDK: https://github.com/aws/aws-sdk-cpp/releases (this is a useful project, as it was observed with several additional libraries configured for linking)
- Install CMake (versions 3.4 and later seem to have the bug)
- Run the following within a clean build target directory (ensuring that the leading drive letter "c:" is lower-case):
"c:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 14 Win64" -DENABLE_TESTING=OFF -DBUILD_ONLY=core C:\dev\aws-sdk-cpp-1.0.69
- Observe that the produced "aws-cpp-sdk-core/aws-cpp-sdk-core.vcxproj" file contains invalid library names within AdditionalDependencies (there are some other misconfiguration issues as well):
- Expected names are:
This used to work with CMake 3.3, and appears to be a regression possibly caused by http://review.source.kitware.com/#/c/19985/1/SystemTools.cxx
This fix in SystemTools.cxx seems to resolve the problem (cmSystemTools.cxx):
cmSystemToolsCMakeRoot = GetActualCaseForPath(prefix + CMAKE_DATA_DIR);
My workaround in the meantime is to ensure that the full path provided when running CMake has a capitalized drive letter.