Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMB profile #676

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
68 changes: 68 additions & 0 deletions examples/cmb.darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This profile file controls your <#> (HashDist) build environment.

# In the future, we'll provide better incorporation of
# automatic environment detection. For now, have a look
# at the YAML files in the top-level directory and choose
# the most *specific* file that matches your environment.

extends:
- file: osx.yaml

parameters:
HOST_MPICC: /usr/local/bin/mpicc
HOST_MPICXX: /usr/local/bin/mpic++
HOST_CMAKE: /usr/local/bin/cmake
PROLOGUE: |
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed "s/\(10.[0-9]\).*/\1/"); export CXX=/usr/bin/clang++; export CC=/usr/bin/clang;

# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.

packages:
#blas and lapack are required by numpy
blas:
use: host-osx-framework-accelerate
lapack:
use: host-osx-framework-accelerate
cmake:
use: host-cmake
mpi:
use: host-mpi

libxml2:
png:
szip:
zlib:
boost:
toolset: clang
address_model: 64

#file format packages
hdf5:
netcdf4:
netcdf4cpp:

#now the rest
freetype:
gdal:
kml:
matplotlib:
molequeue:
numpy:
python:
qt:
toolset: unsupported/macx-clang
arch: x86_64
remus:
shiboken:
smtk:
vxl:
zmq:
launcher:
paraview:
cmb:

#not worth the time to enable
#ffmpeg:
67 changes: 67 additions & 0 deletions examples/cmb.linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This profile file controls your <#> (HashDist) build environment.

# In the future, we'll provide better incorporation of
# automatic environment detection. For now, have a look
# at the YAML files in the top-level directory and choose
# the most *specific* file that matches your environment.

extends:
- file: linux.yaml

parameters:
HOST_MPICC: /usr/bin/mpicc
HOST_MPICXX: /usr/bin/mpic++
HOST_MPIF77: /usr/bin/mpif77
HOST_MPIF90: /usr/bin/mpif90
HOST_MPIEXEC: /usr/bin/mpiexec
HOST_CMAKE: /usr/local/bin/cmake
PATH: |
/usr/local/bin:/bin:/usr/sbin:/sbin:/usr/bin:
PROLOGUE: |
export CXX=/usr/bin/g++-4.8; export CC=/usr/bin/gcc-4.8; export C_INCLUDE_PATH=/usr/include/mpi/; export CPLUS_INCLUDE_PATH=/usr/include/mpi/;

# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.

packages:
blas:
use: host-blas
cmake:
use: host-cmake
mpi:
use: host-mpi
curl:
szip:
bzip2:
zlib:
libxml2:
png:
boost:
toolset: gcc
address_model: 64

#file format packages
hdf5:
netcdf4:
netcdf4cpp:

#now the rest
freetype:
matplotlib:
numpy:
python:
host: true
link: shared
qt:
arch: x86_64
remus:
shiboken:
smtk:
vxl:
zmq:

launcher:
paraview:
cmb:
60 changes: 60 additions & 0 deletions examples/paraview.darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This profile file controls your <#> (HashDist) build environment.

# In the future, we'll provide better incorporation of
# automatic environment detection. For now, have a look
# at the YAML files in the top-level directory and choose
# the most *specific* file that matches your environment.

extends:
- file: osx.yaml

parameters:
HOST_MPICC: /usr/local/bin/mpicc
HOST_MPICXX: /usr/local/bin/mpic++
HOST_CMAKE: /usr/local/bin/cmake
PROLOGUE: |
export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed "s/\(10.[0-9]\).*/\1/"); export CXX=/usr/bin/clang++; export CC=/usr/bin/clang;

# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.

packages:
#blas and lapack are required by numpy
blas:
use: host-osx-framework-accelerate
lapack:
use: host-osx-framework-accelerate
cmake:
use: host-cmake
mpi:
use: host-mpi

curl:
szip:
bzip2:
zlib:
libxml2:
png:
boost:
toolset: clang
address_model: 64

#file format packages
hdf5:
netcdf4:
netcdf4cpp:

#now the rest
freetype:
matplotlib:
numpy:
python:
host: true
link: shared
qt:
toolset: unsupported/macx-clang
arch: x86_64
launcher:
paraview:
60 changes: 60 additions & 0 deletions examples/paraview.linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This profile file controls your <#> (HashDist) build environment.

# In the future, we'll provide better incorporation of
# automatic environment detection. For now, have a look
# at the YAML files in the top-level directory and choose
# the most *specific* file that matches your environment.

extends:
- file: linux.yaml

parameters:
HOST_MPICC: /usr/bin/mpicc
HOST_MPICXX: /usr/bin/mpic++
HOST_MPIF77: /usr/bin/mpif77
HOST_MPIF90: /usr/bin/mpif90
HOST_MPIEXEC: /usr/bin/mpiexec
HOST_CMAKE: /usr/local/bin/cmake
PATH: |
/usr/local/bin:/bin:/usr/sbin:/sbin:/usr/bin:
PROLOGUE: |
export CXX=/usr/bin/g++-4.8; export CC=/usr/bin/gcc-4.8; export C_INCLUDE_PATH=/usr/include/mpi/; export CPLUS_INCLUDE_PATH=/usr/include/mpi/;

# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.

packages:
blas:
use: host-blas
cmake:
use: host-cmake
mpi:
use: host-mpi
curl:
szip:
bzip2:
zlib:
libxml2:
png:
boost:
toolset: gcc
address_model: 64

#file format packages
hdf5:
netcdf4:
netcdf4cpp:

#now the rest
freetype:
matplotlib:
numpy:
python:
host: true
link: shared
qt:
arch: x86_64
launcher:
paraview:
25 changes: 25 additions & 0 deletions pkgs/cmb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
extends: [cmake_package]
dependencies:
build: [boost, png, qt, zlib, bzip2, gdal, hdf5,
mpi, netcdf4, netcdf4cpp, freetype,
python, numpy, matplotlib, libxml2,
paraview, remus, vxl, kml, molequeue, smtk, zmq, {{build_with}}]

sources:
- key: git:b24225a52187a124f5f83bdb7212d363f9254519
url: git://public.kitware.com/CMB.git

build_stages:
- name: configure
mode: override
extra: [
'-DCMAKE_C_COMPILER:FILEPATH={{HOST_MPICC}}',
'-DCMAKE_CXX_COMPILER:FILEPATH={{HOST_MPICXX}}',
'-DBUILD_SHARED_LIBS:BOOL=ON',
'-DBUILD_TESTING:BOOL=OFF',
'-DKML_DIR:PATH=${KML_DIR}',
'-DGDAL_DIR:PATH=${GDAL_DIR}',
'-DParaView_DIR:PATH=${PARAVIEW_DIR}',
'-DMoleQueue_DIR:PATH=${MOLEQUEUE_DIR}',
'-DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS}"',
]
9 changes: 9 additions & 0 deletions pkgs/molequeue/header-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/molequeue/transport/messageidmanager_p.cpp
+++ b/molequeue/transport/messageidmanager_p.cpp
@@ -17,6 +17,7 @@
#include "messageidmanager_p.h"

#include "message.h"
+#include <stdlib.h>

namespace MoleQueue {
26 changes: 26 additions & 0 deletions pkgs/molequeue/molequeue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
extends: [cmake_package]
dependencies:
build: [qt]

sources:
- key: git:e545ee25b4b79d5bae9e1cd0515fccb39f44d19d
url: git://source.openchemistry.org/molequeue.git

defaults:
# lib/cmake/molequeue/MoleQueueConfig.cmake contains hard-coded path
relocatable: false

build_stages:
- name: patch
before: configure
files: [header-fix.patch]
handler: bash
bash: |
patch -up1 < _hashdist/header-fix.patch

- name: configure
mode: override
extra: ['-DBUILD_SHARED_LIBS:BOOL=ON',
'-DCMAKE_BUILD_TYPE:STRING=Release',
'-DENABLE_TESTING:BOOL=OFF'
]
66 changes: 66 additions & 0 deletions pkgs/paraview/findnetcdf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--- a/VTK/CMake/FindNetCDF.cmake
+++ b/VTK/CMake/FindNetCDF.cmake
@@ -38,17 +38,26 @@ if (NETCDF_INCLUDE_DIR AND NETCDF_LIBRARY)
set (NETCDF_FIND_QUIETLY TRUE)
endif ()

+set(USE_DEFAULT_PATHS "NO_DEFAULT_PATH")
+if(NETCDF_USE_DEFAULT_PATHS)
+ set(USE_DEFAULT_PATHS "")
+endif()
+
find_path (NETCDF_INCLUDE_DIR netcdf.h
- HINTS NETCDF_DIR ENV NETCDF_DIR)
+ HINTS "${NETCDF_DIR}/include")
mark_as_advanced (NETCDF_INCLUDE_DIR)
set (NETCDF_C_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})

-find_library (NETCDF_LIBRARY NAMES netcdf)
+find_library (NETCDF_LIBRARY NAMES netcdf
+ HINTS "${NETCDF_DIR}/lib")
mark_as_advanced (NETCDF_LIBRARY)
+
set (NETCDF_C_LIBRARIES ${NETCDF_LIBRARY})

#start finding requested language components
set (NetCDF_libs "")
+set (netCDF_includes "${NETCDF_INCLUDE_DIR}")
+
get_filename_component (NetCDF_lib_dirs "${NETCDF_LIBRARY}" PATH)
set (NETCDF_HAS_INTERFACES "YES") # will be set to NO if we're missing any interfaces

@@ -56,9 +65,15 @@ macro (NetCDF_check_interface lang header libs)
if (NETCDF_${lang})
#search starting from user modifiable cache var
find_path (NETCDF_${lang}_INCLUDE_DIR NAMES ${header}
- HINTS "${NETCDF_INCLUDE_DIR}" NO_DEFAULT_PATH)
+ HINTS "${NETCDF_INCLUDE_DIR}"
+ HINTS "${NETCDF_${lang}_ROOT}/include"
+ ${USE_DEFAULT_PATHS})
+
find_library (NETCDF_${lang}_LIBRARY NAMES ${libs}
- HINTS "${NetCDF_lib_dirs}" NO_DEFAULT_PATH)
+ HINTS "${NetCDF_lib_dirs}"
+ HINTS "${NETCDF_${lang}_ROOT}/lib"
+ ${USE_DEFAULT_PATHS})
+
mark_as_advanced (NETCDF_${lang}_INCLUDE_DIR NETCDF_${lang}_LIBRARY)

#export to internal varS that rest of project can use directly
@@ -67,6 +82,7 @@ macro (NetCDF_check_interface lang header libs)

if (NETCDF_${lang}_INCLUDE_DIR AND NETCDF_${lang}_LIBRARY)
list (APPEND NetCDF_libs ${NETCDF_${lang}_LIBRARY})
+ list (APPEND netCDF_includes ${NETCDF_${lang}_INCLUDE_DIR})
else ()
set (NETCDF_HAS_INTERFACES "NO")
message (STATUS "Failed to find NetCDF interface for ${lang}")
@@ -93,7 +109,7 @@ NetCDF_check_interface (F90 netcdf.mod netcdff)
#export accumulated results to internal varS that rest of project can depend on
list (APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}")
set (NETCDF_LIBRARIES ${NetCDF_libs})
-set (NETCDF_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR})
+set (NETCDF_INCLUDE_DIRS ${netCDF_includes})

# handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if
# all listed variables are TRUE
Loading