Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [tarantool-patches] [PATCH 1/1] travis-ci: fixed Mojave mac build with CMAKE_OSX_DEPLOYMENT_TARGET
@ 2019-02-19 14:05 Alexander Tikhonov
  2019-02-20 14:58 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Tikhonov @ 2019-02-19 14:05 UTC (permalink / raw)
  To: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 4513 bytes --]


1. Changed the Travis-CI testing default OSX image from 'xcode9' to 'xcode10.1',
also added Travis-CI's default 'xcode9.4' image to the '2.1' branch testing.
2. Corrected virtualenv setup for OSX images where it is not installed by default.
3. Corrected the minimum version of OSX image on which the target binaries are to be
deployed. CMake uses this value for the -mmacosx-version-min flag and to help choose the
default SDK. The CMAKE_OSX_DEPLOYMENT_TARGET depends on DARWIN_VERSION:
DARWIN_VERSION <= 10.12 -> CMAKE_OSX_DEPLOYMENT_TARGET = 10.6
DARWIN_VERSION >= 10.13 -> CMAKE_OSX_DEPLOYMENT_TARGET = 10.14

Closes #3797
---
Travis-CI:  https://travis-ci.org/tarantool/tarantool/builds/495448673  
Travis-CI(checked all OSX):  https://travis-ci.org/tarantool/tarantool/builds/495415195  
Branch:  https://github.com/tarantool/tarantool/tree/remotes/origin/avtikhon/gh-3797-fix-mojave-mac-build

diff --git a/.travis.mk b/.travis.mk
index edd94cd7d..181bab438 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -47,6 +47,10 @@ test_ubuntu: deps_ubuntu
 deps_osx:
     brew update
     brew install openssl readline curl icu4c --force
+    virtualenv -h >/dev/null 2>&1 || \
+        ( pip -h >/dev/null 2>&1 || ( curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python && pip --version ) && \
+        brew install pyenv-virtualenv --force && \
+        pip install virtualenv )
 
 test_osx: deps_osx
     cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfoWError ${CMAKE_EXTRA_PARAMS}
diff --git a/.travis.yml b/.travis.yml
index ffe2e8247..e03bd3185 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ language: cpp
 os: linux
 compiler: gcc
 
-osx_image: xcode9
+osx_image: xcode10.1
 
 cache:
     directories:
@@ -27,6 +27,11 @@ jobs:
       - name: RelWithDebInfoWError build + test (OS X)
         env: TARGET=test
         os: osx
+      - name: RelWithDebInfoWError build + test (OS X 9.4)
+        env: TARGET=test
+        os: osx
+        osx_image: xcode9.4
+        if: branch = "2.1"
       - name: Debug build + test + coverage (Linux, gcc)
         env: TARGET=coverage
       - name: LTO build + test (Linux, gcc)
diff --git a/cmake/luajit.cmake b/cmake/luajit.cmake
index ea4878a93..d2253a0f9 100644
--- a/cmake/luajit.cmake
+++ b/cmake/luajit.cmake
@@ -194,9 +194,28 @@ macro(luajit_build)
         endif()
         # Pass deployment target
         if ("${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
-            # Default to 10.6 since @rpath support is NOT available in
-            # earlier versions, needed by AddressSanitizer.
-            set (luajit_osx_deployment_target 10.6)
+            # DARWIN_VERSION <= 10.12 -> CMAKE_OSX_DEPLOYMENT_TARGET = 10.6
+            # DARWIN_VERSION >= 10.13 -> CMAKE_OSX_DEPLOYMENT_TARGET = 10.14
+            execute_process(COMMAND sw_vers -productVersion
+                OUTPUT_VARIABLE PRODUCT_VERSION)
+            message(STATUS "PRODUCT_VERSION=${PRODUCT_VERSION}")
+            string(REGEX MATCH "[0-9]+.[0-9]+" DARWIN_VERSION ${PRODUCT_VERSION})
+            message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}")
+            string(REGEX MATCH "^[0-9]+" MAJOR_VERSION ${DARWIN_VERSION})
+            message(STATUS "MAJOR_VERSION=${MAJOR_VERSION}")
+            if (MAJOR_VERSION GREATER 10)
+                set (luajit_osx_deployment_target 10.14)
+            elseif (MAJOR_VERSION LESS 10)
+                set (luajit_osx_deployment_target 10.6)
+            elseif (MAJOR_VERSION EQUAL 10)
+                string(REGEX MATCH "[0-9]+$" MINOR_VERSION ${DARWIN_VERSION})
+                message(STATUS "MINOR_VERSION=${MINOR_VERSION}")
+                if (MINOR_VERSION GREATER 12)
+                    set (luajit_osx_deployment_target 10.14)
+                else ()
+                    set (luajit_osx_deployment_target 10.6)
+                endif ()
+            endif ()
         else()
             set (luajit_osx_deployment_target ${CMAKE_OSX_DEPLOYMENT_TARGET})
         endif()


-- 
Alexander Tikhonov

[-- Attachment #2: Type: text/html, Size: 7227 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-12  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 14:05 [tarantool-patches] [tarantool-patches] [PATCH 1/1] travis-ci: fixed Mojave mac build with CMAKE_OSX_DEPLOYMENT_TARGET Alexander Tikhonov
2019-02-20 14:58 ` [tarantool-patches] " Alexander Turenko
2019-02-21 10:39   ` [tarantool-patches] Re[2]: [tarantool-patches] [tarantool-patches] " Alexander Tikhonov
     [not found]   ` <1550951995.54875386@f494.i.mail.ru>
2019-03-05 20:27     ` [tarantool-patches] " Alexander Turenko
2019-03-12  7:27       ` [tarantool-patches] " Alexander Tikhonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox