summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Compiler/AppleClang-OBJCXX.cmake2
-rw-r--r--Modules/Compiler/GNU-OBJC.cmake4
-rw-r--r--Modules/Compiler/GNU-OBJCXX.cmake6
-rw-r--r--Modules/FindPython/Support.cmake3
-rw-r--r--Modules/Platform/Darwin.cmake4
-rw-r--r--Source/cmLocalGenerator.cxx9
6 files changed, 17 insertions, 11 deletions
diff --git a/Modules/Compiler/AppleClang-OBJCXX.cmake b/Modules/Compiler/AppleClang-OBJCXX.cmake
index 7c6f763..2c084af 100644
--- a/Modules/Compiler/AppleClang-OBJCXX.cmake
+++ b/Modules/Compiler/AppleClang-OBJCXX.cmake
@@ -1,5 +1,7 @@
include(Compiler/Clang-OBJCXX)
+set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+
if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.0)
set(CMAKE_OBJCXX98_STANDARD_COMPILE_OPTION "-std=c++98")
set(CMAKE_OBJCXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
diff --git a/Modules/Compiler/GNU-OBJC.cmake b/Modules/Compiler/GNU-OBJC.cmake
index 5fba801..fb9b0b2 100644
--- a/Modules/Compiler/GNU-OBJC.cmake
+++ b/Modules/Compiler/GNU-OBJC.cmake
@@ -1,6 +1,2 @@
include(Compiler/GNU)
__compiler_gnu(OBJC)
-
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
- set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
-endif()
diff --git a/Modules/Compiler/GNU-OBJCXX.cmake b/Modules/Compiler/GNU-OBJCXX.cmake
index 66a547e..06f0244 100644
--- a/Modules/Compiler/GNU-OBJCXX.cmake
+++ b/Modules/Compiler/GNU-OBJCXX.cmake
@@ -1,8 +1,8 @@
include(Compiler/GNU)
-__compiler_gnu(OBJC)
+__compiler_gnu(OBJCXX)
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
- set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+if(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 4.2)
+ set(CMAKE_OBJCXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()
if(NOT CMAKE_OBJCXX_LINK_FLAGS)
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 1b5a9db..3b15354 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -62,6 +62,9 @@ macro (_PYTHON_FIND_FRAMEWORKS)
${CMAKE_SYSTEM_FRAMEWORK_PATH})
list (REMOVE_DUPLICATES _pff_frameworks)
foreach (_pff_framework IN LISTS _pff_frameworks)
+ if (EXISTS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
+ list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR}.framework)
+ endif()
if (EXISTS ${_pff_framework}/Python.framework)
list (APPEND ${_PYTHON_PREFIX}_FRAMEWORKS ${_pff_framework}/Python.framework)
endif()
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 1482d76..e5a57b5 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -157,6 +157,10 @@ if(_CMAKE_OSX_SYSROOT_PATH)
endif()
endforeach()
endif()
+if (OSX_DEVELOPER_ROOT AND EXISTS "${OSX_DEVELOPER_ROOT}/Library/Frameworks")
+ list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${OSX_DEVELOPER_ROOT}/Library/Frameworks)
+endif()
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks
/Network/Library/Frameworks
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) {