Genex: Fix COMPILE_LANGUAGE messages to allow file(GENERATE) with Xcode

When rejecting the `COMPILE_LANGUAGE` generator expression on include
directories and compile definitions with Xcode, add `file(GENERATE)` to
the allowed set in the message.  It is allowed and already covered
by the `RunCMake.File_Generate` test `COMPILE_LANGUAGE-genex` case.
This commit is contained in:
Brad King
2017-11-17 11:43:19 -05:00
parent c5a82d0f88
commit 0f6f7c8ab1
3 changed files with 6 additions and 6 deletions

View File

@@ -838,8 +838,8 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
dagChecker->EvaluatingIncludeDirectories())) {
reportError(
context, content->GetOriginalExpression(),
"$<COMPILE_LANGUAGE:...> may only be used with COMPILE_OPTIONS "
"with the Xcode generator.");
"$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS "
"and file(GENERATE) with the Xcode generator.");
return std::string();
}
} else {

View File

@@ -3,7 +3,7 @@ CMake Error at CompileDefinitions.cmake:5 \(target_compile_definitions\):
\$<COMPILE_LANGUAGE:CXX>
\$<COMPILE_LANGUAGE:...> may only be used with COMPILE_OPTIONS with the
Xcode generator.
\$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS and
file\(GENERATE\) with the Xcode generator.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)

View File

@@ -3,7 +3,7 @@ CMake Error at IncludeDirectories.cmake:5 \(target_include_directories\):
\$<COMPILE_LANGUAGE:CXX>
\$<COMPILE_LANGUAGE:...> may only be used with COMPILE_OPTIONS with the
Xcode generator.
\$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS and
file\(GENERATE\) with the Xcode generator.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)