Windows: Warn when TEMP directory is not writable
A trivial C project configured fine on all my boxes but one, where cmake complained
No CMAKE_C_COMPILER could be found
and No CMAKE_CXX_COMPILER could be found
CMakeError.log showed the compiler id check program failed to
compile; it was located in c:\windows\temp. I looked there, and found
I couldn't even read that directory. Executing
cacls C:\Windows\Temp /E /G everyone:F
as administrator made the pain go away.
IIRC CMakeError.log also contained the odd message
error MSB4036: The "SetEnvironmentVariable" task was not found.
which may be another telltale for this problem.
Suggestion: when issuing the error "No CMAKE_C_COMPILER could be found" on windows, consider hinting to the user that making c:\windows\temp writeable may help?
This was with Windows 10, Visual Studio 2015, and several versions of cmake (3.6.2 to the latest release). I think I've seen it before with older versions of Visual Studio in the past.