diff options
author | Brad King <brad.king@kitware.com> | 2017-11-27 14:00:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-27 14:00:44 (GMT) |
commit | 1882ba2e0506deeb06f334b7459921286238d719 (patch) | |
tree | 3ac503b319e019545d4e08cbfa131b967d00bd1b /Source | |
parent | b67762ff3c4e24be75090cb2dca6c2b0e7f08dcb (diff) | |
parent | 2ae880fa8f04a2026939b1df9613b64a301aa522 (diff) | |
download | CMake-1882ba2e0506deeb06f334b7459921286238d719.zip CMake-1882ba2e0506deeb06f334b7459921286238d719.tar.gz CMake-1882ba2e0506deeb06f334b7459921286238d719.tar.bz2 |
Merge topic 'extend-compile-language-genex'
2ae880fa Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual Studio
2b7d59f3 Genex: Enable COMPILE_LANGUAGE for file(GENERATE) with Visual Studio
0f6f7c8a Genex: Fix COMPILE_LANGUAGE messages to allow file(GENERATE) with Xcode
c5a82d0f Tests: Decouple COMPILE_LANGUAGE in file(GENERATE) from COMPILE_OPTIONS
25773650 Tests: Remove unnecessary result files from RunCMake.File_Generate
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !1511
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 7fe0cbe..3d311d6 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -828,18 +828,21 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode } std::string genName = gg->GetName(); if (genName.find("Visual Studio") != std::string::npos) { - reportError(context, content->GetOriginalExpression(), - "$<COMPILE_LANGUAGE:...> may not be used with Visual Studio " - "generators."); - return std::string(); - } - if (genName.find("Xcode") != std::string::npos) { if (dagChecker && (dagChecker->EvaluatingCompileDefinitions() || 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 Visual Studio generator."); + return std::string(); + } + } else if (genName.find("Xcode") != std::string::npos) { + if (dagChecker && (dagChecker->EvaluatingCompileDefinitions() || + dagChecker->EvaluatingIncludeDirectories())) { + reportError( + context, content->GetOriginalExpression(), + "$<COMPILE_LANGUAGE:...> may only be used for COMPILE_OPTIONS " + "and file(GENERATE) with the Xcode generator."); return std::string(); } } else { |