Added python

This commit is contained in:
Guilhem Lavaux 2014-05-25 10:43:06 +02:00
parent 950cfb3eb1
commit b584ff54a7
5 changed files with 66 additions and 3 deletions

View file

@ -7,6 +7,11 @@ include(GetGitRevisionDescription)
include(ExternalProject)
include(FindOpenMP)
include(FindPythonLibs)
set(NumPy_FIND_REQUIRED TRUE)
include(${CMAKE_SOURCE_DIR}/FindNumPy.cmake)
get_git_head_revision(HEAD GIT_VER)
option(BUILD_SHARED_LIBS "Build shared libraries." OFF)
@ -14,6 +19,12 @@ option(BUILD_STATIC_LIBS "Build static libraries." ON)
option(ENABLE_OPENMP "Enable OpenMP support." OFF)
option(ENABLE_SHARP "Enable SPHT support." ON)
IF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
SET(CosmoTool_local CosmoTool_static)
ELSE(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
SET(CosmoTool_local CosmoTool)
ENDIF(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h)
find_path(NETCDFCPP_INCLUDE_PATH NAMES netcdfcpp.h netcdf)
find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h)
@ -31,6 +42,8 @@ find_library(NETCDF_LIBRARY netcdf)
find_library(GSL_LIBRARY gsl)
find_library(GSLCBLAS_LIBRARY gslcblas)
find_program(CYTHON cython)
find_package(Boost 1.53)
if (ENABLE_SHARP)
@ -108,5 +121,6 @@ SET(CPACK_SOURCE_IGNORE_FILES
add_subdirectory(src)
add_subdirectory(sample)
add_subdirectory(python)
include(CPack)