mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03: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:
1 parent
3436858697
commit
30a234d275
3 files changed
+5
-5
No files matched your search
@@ -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