Allow to opt-out from yorick classes

This commit is contained in:
Guilhem Lavaux 2015-04-07 14:45:38 +02:00
parent f7d6aa9bd3
commit e2ef019ab5
3 changed files with 40 additions and 25 deletions

View file

@ -20,6 +20,7 @@ option(INTERNAL_HDF5 "Build internal version of HDF5" OFF)
option(INTERNAL_NETCDF "Build internal version of NETCDF" OFF)
option(INTERNAL_BOOST "Build internal version of BOOST" OFF)
option(USE_GIT_VERSION "Use GIT version to pad version number" OFF)
option(YORICK_SUPPORT "Add for pleasant yorick support" ON)
IF(USE_GIT_VERSION)
get_git_head_revision(HEAD GIT_VER)
SET(EXTRA_VERSION "-${GIT_VER}")
@ -36,13 +37,15 @@ MESSAGE(STATUS "Using the target ${CosmoTool_local} to build python module")
include(${CMAKE_SOURCE_DIR}/external/external_build.cmake)
IF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
SET(FOUND_NETCDF4 1)
FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#define NETCDFCPP4 1")
ELSE(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
SET(FOUND_NETCDF3 1)
FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#undef NETCDFCPP4")
ENDIF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
IF(YORICK_SUPPORT)
IF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
SET(FOUND_NETCDF4 1)
FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#define NETCDFCPP4 1")
ELSE(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
SET(FOUND_NETCDF3 1)
FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#undef NETCDFCPP4")
ENDIF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4")
ENDIF(YORICK_SUPPORT)
find_program(CYTHON cython)
@ -52,7 +55,7 @@ endif(HDF5_ROOTDIR)
find_package(HDF5 COMPONENTS HL CXX)
set(NETCDF_FIND_REQUIRED TRUE)
set(NETCDF_FIND_REQUIRED ${YORICK_SUPPORT})
set(GSL_FIND_REQUIRED TRUE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NetCDF DEFAULT_MSG NETCDF_LIBRARY NETCDFCPP_LIBRARY NETCDF_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARY GSLCBLAS_LIBRARY GSL_INCLUDE_PATH)