mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
try_compile: Improve error message consistency
Tweak some error messages from try_compile (and try_run) to be more consistent with each other.
This commit is contained in:
@@ -403,19 +403,19 @@ bool cmCoreTryCompile::TryCompileCode(Arguments& arguments,
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
cmStrCat(arguments.LangProps.begin()->first,
|
||||
" allowed only in source file signature."));
|
||||
" allowed only in source file signature"));
|
||||
return false;
|
||||
}
|
||||
if (!arguments.CompileDefs.empty()) {
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"COMPILE_DEFINITIONS specified on a srcdir type TRY_COMPILE");
|
||||
"COMPILE_DEFINITIONS allowed only in source file signature");
|
||||
return false;
|
||||
}
|
||||
if (arguments.CopyFileTo) {
|
||||
this->Makefile->IssueMessage(
|
||||
MessageType::FATAL_ERROR,
|
||||
"COPY_FILE specified on a srcdir type TRY_COMPILE");
|
||||
"COPY_FILE allowed only in source file signature");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at NonSourceCompileDefinitions.cmake:[0-9]+ \(try_compile\):
|
||||
COMPILE_DEFINITIONS specified on a srcdir type TRY_COMPILE
|
||||
COMPILE_DEFINITIONS allowed only in source file signature
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CMake Error at NonSourceCopyFile.cmake:[0-9]+ \(try_compile\):
|
||||
COPY_FILE specified on a srcdir type TRY_COMPILE
|
||||
COPY_FILE allowed only in source file signature
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
Reference in New Issue
Block a user