Skip to content

Commit

Permalink
Add compiler to build of meta.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Besler committed Nov 21, 2019
1 parent d24cf13 commit 6fe3103
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ jobs:
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
displayName: Add conda to path
- bash: |
sudo mkdir -p /opt/
sudo chown -R $USER /opt/
curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz -o MacOSX10.9.sdk.tar.xz
tar -xJf MacOSX10.9.sdk.tar.xz -C /opt/
displayName: Download OSX SDK
- script: conda create -y -n n88 python=2 conda-build
displayName: Setup conda
- script: |
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project (vtkbone)

set(VTKBONE_MAJOR_VERSION 1)
set(VTKBONE_MINOR_VERSION 0)
set(VTKBONE_PATCH_VERSION 2)
set(VTKBONE_PATCH_VERSION 1)
set (VTKBONE_VERSION_TAG "devel")

# This is the version for CMake purposes, which must be of the form x.y.z
Expand Down Expand Up @@ -360,3 +360,8 @@ install (FILES "${PROJECT_BINARY_DIR}/vtkboneConfigure.h" DESTINATION include)
if (ENABLE_TESTING)
add_subdirectory (Testing)
endif ()

get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
10 changes: 6 additions & 4 deletions conda-recipe/vtkbone/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ case $(uname | tr '[:upper:]' '[:lower:]') in
darwin*)
export PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.dylib"
export PYTHON_INCLUDE_DIR="${PREFIX}/include/python${PY_VER}"

# Get the SDK
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_OSX_SYSROOT="${CONDA_BUILD_SYSROOT}")
;;
*)
esac

# C/CXX Flags
export CFLAGS="-fPIC"
export CXXFLAGS="-fPIC"
printenv

# CMake
cmake .. \
Expand All @@ -33,7 +34,8 @@ cmake .. \
-DBOOST_ROOT:PATH="${PREFIX}" \
-DPYTHON_LIBRARY:FILEPATH="${PYTHON_LIBRARY}" \
-DPYTHON_INCLUDE_DIR:PATH="${PYTHON_INCLUDE_DIR}" \
-DENABLE_TESTING:BOOL=ON
-DENABLE_TESTING:BOOL=ON \
"${CMAKE_PLATFORM_FLAGS[@]}"

# Compile and install
ninja install -v
Expand Down
14 changes: 14 additions & 0 deletions conda-recipe/vtkbone/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2015 # [win]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2015 # [win]
macos_min_version: # [osx]
- 10.9 # [osx]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- 10.9 # [osx]
CONDA_BUILD_SYSROOT:
- /opt/MacOSX10.9.sdk # [osx]
1 change: 1 addition & 0 deletions conda-recipe/vtkbone/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build:
# Note, boost has an upperbound right now to hanlde cmake correctly
requirements:
build:
- {{ compiler('cxx') }}
- cmake >=3.1.0
- ninja
- gtest
Expand Down

0 comments on commit 6fe3103

Please sign in to comment.