diff options
author | Brad King <brad.king@kitware.com> | 2013-10-24 17:04:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-28 12:36:14 (GMT) |
commit | 3e04946f7b69418f6b222875ad18fed3438e0fa1 (patch) | |
tree | 7b2107ea4b681e67d27b7a881e9572864324ad69 /Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake | |
parent | 6007f7ca01b84ee70ffe49ae5a8bb41763116024 (diff) | |
download | CMake-3e04946f7b69418f6b222875ad18fed3438e0fa1.zip CMake-3e04946f7b69418f6b222875ad18fed3438e0fa1.tar.gz CMake-3e04946f7b69418f6b222875ad18fed3438e0fa1.tar.bz2 |
Require CMAKE_<LANG>_COMPILER to be found as a full path
All generators now support detection of the full path to the compiler, so
require it to be so. This will allow CMake<LANG>Information.cmake and
other logic to assume the full path to the compiler tool is available.
The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
that did not name an existing compiler. Extend this error message to
all generators, make it occur as early as possible, and improve the
message with advice about how to set the compiler. If the full path to
the compiler is not known, finish enabling languages with a fatal error
so configuration does not continue.
For now, allow the RC language compiler to not be a full path. Later we
will need to detect the full path to "rc" under the VS IDE.
Add a RunCMake.CompilerNotFound test to cover failure cases.
Fix the RunCMake.CompilerChange test EmptyCompiler case to work
when configuration does not continue past enable_language.
Diffstat (limited to 'Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake b/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake new file mode 100644 index 0000000..8b84f39 --- /dev/null +++ b/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake @@ -0,0 +1,11 @@ +include(RunCMake) + +if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode") + run_cmake(NoCompilerC-IDE) + run_cmake(NoCompilerCXX-IDE) + run_cmake(NoCompilerCandCXX-IDE) +else() + run_cmake(BadCompilerC) + run_cmake(BadCompilerCXX) + run_cmake(BadCompilerCandCXX) +endif() |