summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2020-01-10 15:31:27 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2020-01-10 15:31:27 (GMT)
commit7347e2f830b75dae94535b64d3925b55b098d88b (patch)
tree0ab85c5e0ad03e3017f6556d4d95c949599fbca1 /Source
parent68537b890ba155632b3679dc77c0e04148bf18d5 (diff)
downloadCMake-7347e2f830b75dae94535b64d3925b55b098d88b.zip
CMake-7347e2f830b75dae94535b64d3925b55b098d88b.tar.gz
CMake-7347e2f830b75dae94535b64d3925b55b098d88b.tar.bz2
ObjC: Add VISIBLITY_INLINES_HIDDEN support
Fixes: #20193
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1754421..be13a37 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2104,10 +2104,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;
@@ -2149,8 +2150,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) {