summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-05 13:38:59 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-05 13:38:59 (GMT)
commitff8917fdd2e8739a46c84ab03911258c23779744 (patch)
tree501e695d25bd0256e932d090eb1b70dc71bd8f8b /Source/cmTarget.cxx
parent4d15c0b7c6f11c7486da7e760c59a1e7daabacab (diff)
parentcd1fa537a03377974a4d0a27e592785f931a41e5 (diff)
downloadCMake-ff8917fdd2e8739a46c84ab03911258c23779744.zip
CMake-ff8917fdd2e8739a46c84ab03911258c23779744.tar.gz
CMake-ff8917fdd2e8739a46c84ab03911258c23779744.tar.bz2
Merge topic 'VISIBILITY_PRESET-property'
cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index af92ccc..ab051d0 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -960,6 +960,35 @@ void cmTarget::DefineProperties(cmake *cm)
"(such as \"lib\") on a library name.");
cm->DefineProperty
+ ("C_VISIBILITY_PRESET", cmProperty::TARGET,
+ "Value for symbol visibility compile flags",
+ "The C_VISIBILITY_PRESET property determines the value passed used in "
+ "a visibility related compile option, such as -fvisibility=. This "
+ "property only has an affect for libraries and executables with "
+ "exports. This property is initialized by the value of the variable "
+ "CMAKE_C_VISIBILITY_PRESET if it is set when a target is created.");
+
+ cm->DefineProperty
+ ("CXX_VISIBILITY_PRESET", cmProperty::TARGET,
+ "Value for symbol visibility compile flags",
+ "The CXX_VISIBILITY_PRESET property determines the value passed used in "
+ "a visibility related compile option, such as -fvisibility=. This "
+ "property only has an affect for libraries and executables with "
+ "exports. This property is initialized by the value of the variable "
+ "CMAKE_CXX_VISIBILITY_PRESET if it is set when a target is created.");
+
+ cm->DefineProperty
+ ("VISIBILITY_INLINES_HIDDEN", cmProperty::TARGET,
+ "Whether to add a compile flag to hide symbols of inline functions",
+ "The VISIBILITY_INLINES_HIDDEN property determines whether a flag for "
+ "hiding symbols for inline functions. the value passed used in "
+ "a visibility related compile option, such as -fvisibility=. This "
+ "property only has an affect for libraries and executables with "
+ "exports. This property is initialized by the value of the variable "
+ "CMAKE_VISIBILITY_INLINES_HIDDEN if it is set when a target is "
+ "created.");
+
+ cm->DefineProperty
("POSITION_INDEPENDENT_CODE", cmProperty::TARGET,
"Whether to create a position-independent target",
"The POSITION_INDEPENDENT_CODE property determines whether position "
@@ -1612,6 +1641,10 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->InsertInclude(*it);
}
+ this->SetPropertyDefault("C_VISIBILITY_PRESET", 0);
+ this->SetPropertyDefault("CXX_VISIBILITY_PRESET", 0);
+ this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", 0);
+
if(this->TargetTypeValue == cmTarget::SHARED_LIBRARY
|| this->TargetTypeValue == cmTarget::MODULE_LIBRARY)
{