Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmake/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
include(CheckCCompilerFlag)

set(CMAKE_SHARED_LIBRARY_SUFFIX .so)

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_REQUIRED_LINK_OPTIONS "-arch;x86_64")
check_c_compiler_flag("-arch x86_64" x86_64Supported)
set(CMAKE_REQUIRED_LINK_OPTIONS "-arch;arm64")
check_c_compiler_flag("-arch arm64" arm64Supported)
if(x86_64Supported AND arm64Supported)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build universal architecture for OSX" FORCE)
endif()
endif()

set(ARROW_SRCS
${CMAKE_BINARY_DIR}/arrow-src/cpp/src/arrow/builder.cc
${CMAKE_BINARY_DIR}/arrow-src/cpp/src/arrow/pretty_print.cc
Expand Down
12 changes: 12 additions & 0 deletions cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.7.2)
project(psp)
include(CheckCCompilerFlag)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -371,6 +372,16 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
# https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")

set(CMAKE_REQUIRED_LINK_OPTIONS "-arch;x86_64")
check_c_compiler_flag("-arch x86_64" x86_64Supported)

set(CMAKE_REQUIRED_LINK_OPTIONS "-arch;arm64")
check_c_compiler_flag("-arch arm64" arm64Supported)

if(x86_64Supported AND arm64Supported)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build universal architecture for OSX" FORCE)
endif()

# on mac, use the vanilla pybind11 finder
find_package(pybind11)
if(pybind11_FOUND)
Expand Down Expand Up @@ -606,6 +617,7 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_NAME_DIR "@rpath/")
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE)

# module_origin_path is the location of the binary
if(MACOS)
Expand Down
5 changes: 4 additions & 1 deletion scripts/build_python.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ let PYTHON = getarg("--python38")
? "python3.8"
: getarg("--python36")
? "python3.6"
: "python3.7";
: getarg("--python37")
? "python3.7"
: "python3";

let IMAGE = "manylinux2010";
const IS_DOCKER = process.env.PSP_DOCKER;

Expand Down
10 changes: 6 additions & 4 deletions scripts/test_python.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ const {
python_image,
} = require("./script_utils.js");

let PYTHON = getarg("--python2")
? "python2"
: getarg("--python38")
let PYTHON = getarg("--python38")
? "python3.8"
: "python3.7";
: getarg("--python36")
? "python3.6"
: getarg("--python37")
? "python3.7"
: "python3";

const COVERAGE = getarg("--coverage");
const VERBOSE = getarg("--debug");
Expand Down