summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-13 15:21:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-13 15:22:06 (GMT)
commit24d143e0f639f1d12789ea2a77fedb769ccc1d42 (patch)
treed36bb13f06220eae2c596e8023014574f2f72c0e /Source/cmLocalGenerator.cxx
parented16d474ea013c4725a46a54ffbcd2ed5dd26ace (diff)
parent7347e2f830b75dae94535b64d3925b55b098d88b (diff)
downloadCMake-24d143e0f639f1d12789ea2a77fedb769ccc1d42.zip
CMake-24d143e0f639f1d12789ea2a77fedb769ccc1d42.tar.gz
CMake-24d143e0f639f1d12789ea2a77fedb769ccc1d42.tar.bz2
Merge topic 'objc-visibility-inlines'
7347e2f830 ObjC: Add VISIBLITY_INLINES_HIDDEN support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4199
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1da6efe..4969d55 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2220,10 +2220,11 @@ static void AddVisibilityCompileOption(std::string& flags,
static void AddInlineVisibilityCompileOption(std::string& flags,
cmGeneratorTarget const* target,
cmLocalGenerator* lg,
- std::string* warnCMP0063)
+ std::string* warnCMP0063,
+ const std::string& lang)
{
std::string compileOption =
- "CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN";
+ cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN");
const char* opt = lg->GetMakefile()->GetDefinition(compileOption);
if (!opt) {
return;
@@ -2265,8 +2266,8 @@ void cmLocalGenerator::AddVisibilityPresetFlags(
AddVisibilityCompileOption(flags, target, this, lang, pWarnCMP0063);
- if (lang == "CXX") {
- AddInlineVisibilityCompileOption(flags, target, this, pWarnCMP0063);
+ if (lang == "CXX" || lang == "OBJCXX") {
+ AddInlineVisibilityCompileOption(flags, target, this, pWarnCMP0063, lang);
}
if (!warnCMP0063.empty() && this->WarnCMP0063.insert(target).second) {