Commit 959b5719 authored by John Tourtellott's avatar John Tourtellott

Fix toolchain to actually use conda compilers

parent 9bca96bb
......@@ -85,7 +85,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Options that the user controls
################################################################################
option(CONDA_BUILD "Building using conda environment instead of system" ON)
option(CONDA_BUILD "Building using conda environment instead of system" OFF)
if (CONDA_BUILD)
include(conda/Conda.cmake)
endif()
......
......@@ -12,20 +12,27 @@ A set of smtk modules can be built from a conda environment:
smtk.resource
smtk.session.mesh
smtk.session.polygon
smtk.simulation
Conda Setup
-----------
These packages are needed in the conda environment:
These packages are needed in the conda environment.
python 2.7
cmake (install this first?)
make (install second?)
python=2.7
gcc_linux-64
gxx_linux-64
boost
moab
nlohmann_json
moab (conda-forge) (install this *AFTER* nlohmann_json)
nlohmann_json (conda-forge)
pybind11
The moab and nlohmann_json packages were obtained from conda-forge; the rest from the
default anaconda repository.
Note about moab: Strange as this seems, it appears that installing nlohmann_json blows
away the cmake config file for moab in the conda environment
(/lib/cmake/MOAB/MOABConfig.cmake). When that happens, the only known workaround is to
uninstall moab then install it a second time.
For linux builds, there is a spec file in the "conda" directory: conda-spec-file-linux64.txt.
......@@ -36,7 +43,7 @@ CMake
-----
When you run CMake the first time, set the CONDA_BUILD option, for example:
cmake -DCONDA_BUILD=ON path-to-smtk-source/
cmake -DCONDA_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=${path-to-smtk-source}/conda/CondaToolchain.cmake ${path-to-smtk-source}
When cmake is run, the output messages include a line starting with the text
......@@ -49,7 +56,6 @@ The cmake scripts also write out out a number of python variables:
PYTHON_EXECUTABLE
PYTHON_INCLUDE_DIRS
PYTHON_LIBRARIES
PYTHONLIBS_VERSION_STRING
Check the cmake output to make sure these variables point to the correct place in your
conda environment.
......
......@@ -14,9 +14,11 @@ set(BOOST_LIBRARYDIR "${conda_root}/lib" CACHE PATH "Initial cache")
set(SMTK_ENABLE_EXODUS_SESSION OFF CACHE BOOL "Initial cache")
set(SMTK_ENABLE_MESH_SESSION ON CACHE BOOL "Initial cache")
set(SMTK_ENABLE_POLYGON_SESSION ON CACHE BOOL "Initial cache")
#set(SMTK_ENABLE_TESTING OFF CACHE BOOL "Initial cache")
set(SMTK_ENABLE_VTK_SUPPORT OFF CACHE BOOL "Initial cache")
# Ignore problems linking executable tests
set(SMTK_ENABLE_TESTING OFF CACHE BOOL "Initial cache")
set(SMTK_ENABLE_PYTHON_WRAPPING ON CACHE BOOL "Initial cache")
# Override default CMAKE_INSTALL_PREFIX
......
set(CMAKE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-Conda")
set(CMAKE_SYSTEM_PROCESSOR conda)
set(conda_root "$ENV{CONDA_PREFIX}")
message("conda_root ${conda_root}")
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
#message("CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
set(CMAKE_SYSROOT "${conda_root}")
set(CMAKE_SYSROOT "${conda_root}/$ENV{HOST}/sysroot")
#message("CMAKE_SYSROOT ${CMAKE_SYSROOT}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
......@@ -9,14 +9,19 @@ https://repo.continuum.io/pkgs/main/linux-64/libgcc-ng-8.2.0-hdf63c60_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libgfortran-3.0.0-1.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libstdcxx-ng-8.2.0-hdf63c60_1.tar.bz2
https://conda.anaconda.org/quantstack/linux-64/nlohmann_json-3.1.2-0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/mpi-1.0-mpich.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/nlohmann_json-3.1.2-hf484d3e_0.tar.bz2
https://repo.anaconda.com/pkgs/free/linux-64/system-5.8-2.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/binutils_linux-64-2.31.1-h6176602_3.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/bzip2-1.0.6-h14c3975_5.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/expat-2.2.6-he6710b0_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/gcc_impl_linux-64-7.3.0-habb00fd_1.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/icu-58.2-h9c2bf20_1.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libopenblas-0.3.3-h5a2b251_3.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/make-4.2.1-h1bed415_1.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/mkl-2019.0-118.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/mpich-3.2.1-h26a2512_4.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/ncurses-6.1-hf484d3e_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/openblas-0.2.20-8.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/openssl-1.0.2p-h14c3975_0.tar.bz2
......@@ -24,15 +29,21 @@ https://repo.continuum.io/pkgs/main/linux-64/xz-5.2.4-h14c3975_4.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/zlib-1.2.11-ha838bed_2.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/blas-1.1-openblas.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/gcc_linux-64-7.3.0-h553295d_3.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/gxx_impl_linux-64-7.3.0-hdf63c60_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/hdf5-1.10.2-hc401514_2.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libboost-1.67.0-h46d08c1_4.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libedit-3.1.20170329-h6b74fdf_2.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libssh2-1.8.0-h9cfc8f7_4.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/readline-7.0-h7b6447c_5.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/rhash-1.3.6-hb7f436b_0.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/tk-8.6.8-hbc83047_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/gxx_linux-64-7.3.0-h553295d_3.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/libcurl-7.61.0-h1ad7b7a_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/moab-5.0.2-hb5afca1_3.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/sqlite-3.24.0-h84994c4_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/cmake-3.12.2-h52cb24c_0.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/python-2.7.15-h1571d57_0.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/certifi-2018.8.24-py27_1.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/certifi-2018.8.24-py27_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/numpy-1.15.1-py27_blas_openblashd3ea46f_1.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/numpy-base-1.15.1-py27h2f8d375_0.tar.bz2
https://repo.continuum.io/pkgs/main/linux-64/pybind11-2.2.3-py27hfd86e86_0.tar.bz2
......
name: smtk-conda
channels:
- quantstack
- conda-forge
- defaults
dependencies:
......@@ -10,6 +9,9 @@ dependencies:
- mkl_fft=1.0.6=py27_0
- mkl_random=1.0.1=py27_0
- moab=5.0.2=hb5afca1_3
- mpi=1.0=mpich
- mpich=3.2.1=h26a2512_4
- nlohmann_json=3.1.2=hf484d3e_0
- numpy=1.15.1=py27_blas_openblashd3ea46f_1
- openblas=0.2.20=8
- binutils_impl_linux-64=2.31.1=h6176602_1
......@@ -18,17 +20,24 @@ dependencies:
- bzip2=1.0.6=h14c3975_5
- ca-certificates=2018.03.07=0
- certifi=2018.8.24=py27_1
- cmake=3.12.2=h52cb24c_0
- expat=2.2.6=he6710b0_0
- gcc_impl_linux-64=7.3.0=habb00fd_1
- gcc_linux-64=7.3.0=h553295d_3
- gxx_impl_linux-64=7.3.0=hdf63c60_1
- gxx_linux-64=7.3.0=h553295d_3
- icu=58.2=h9c2bf20_1
- intel-openmp=2019.0=118
- libboost=1.67.0=h46d08c1_4
- libcurl=7.61.0=h1ad7b7a_0
- libedit=3.1.20170329=h6b74fdf_2
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=8.2.0=hdf63c60_1
- libgfortran-ng=7.3.0=hdf63c60_0
- libopenblas=0.3.3=h5a2b251_3
- libssh2=1.8.0=h9cfc8f7_4
- libstdcxx-ng=8.2.0=hdf63c60_1
- make=4.2.1=h1bed415_1
- mkl=2019.0=118
- ncurses=6.1=hf484d3e_0
- numpy-base=1.15.1=py27h2f8d375_0
......@@ -38,10 +47,11 @@ dependencies:
- pybind11=2.2.3=py27hfd86e86_0
- python=2.7.15=h1571d57_0
- readline=7.0=h7b6447c_5
- rhash=1.3.6=hb7f436b_0
- setuptools=40.2.0=py27_0
- sqlite=3.24.0=h84994c4_0
- system=5.8=2
- tk=8.6.8=hbc83047_0
- wheel=0.31.1=py27_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=ha838bed_2
- nlohmann_json=3.1.2=0
......@@ -7,13 +7,16 @@ source:
git_url: https://gitlab.kitware.com/john.tourtellott/smtk.git
requirements:
host:
- python=2.7
build:
- {{ compiler('cxx') }}
- boost
- cmake
- git
- moab
- cmake
- make
- boost
- nlohmann_json
- moab
- pybind11
- python=2.7
run:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment