Authentication method changed. UCLouvain users, please use the "UCLouvain SSO" button to connect on the website. To connect your git clients, use ssh + ssh key (https://git.immc.ucl.ac.be/-/profile/keys) or https + personal access token. You can create a personal access token with read_repository and write_repository permissions on https://git.immc.ucl.ac.be/-/profile/personal_access_tokens. Then use this token as password with your uclouvain login to access the repositories over https.

Commit 20385de7 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts Committed by Valentin Vallaeys
Browse files

introduce slimFunctionConfig.h

parent 9db516ef
......@@ -23,7 +23,7 @@ if(ENABLE_NETCDF)
find_path (NETCDF_INC "netcdf.h" PATH_SUFFIXES include)
if (NETCDF_INC)
message("slimFunction configured with Netcdf")
add_definitions("-DHAVE_NETCDF")
set(HAVE_NETCDF ON)
include_directories(${NETCDF_INC})
list(APPEND LIBS ${NETCDF_LIB})
dg_add_swig_module(slimNetCDFWrap slimNetCDFWrap.i "dgSlimFunction")
......@@ -39,8 +39,8 @@ if(ENABLE_FES)
find_path(FES_DATA "fes.ini" PATH_SUFFIXES "share/fes_data" HINTS "${FES_INC}/../share/fes_data")
if (FES_INC AND FES_DATA)
message("slimFunction configured with FES")
add_definitions("-DHAVE_FES")
add_definitions("-DFES_DATA \"${FES_DATA}\"")
set(HAVE_FES ON)
set(FES_DATA "\"${FES_DATA}\"")
list(APPEND LIBS ${FES_LIB})
include_directories(${FES_INC})
endif(FES_INC AND FES_DATA)
......@@ -69,7 +69,7 @@ if(ENABLE_PROJ)
)
set (PROJ_INC ${CMAKE_CURRENT_BINARY_DIR}/libproj/src/libproj/src)
message("slimFunction configured with PROJ")
add_definitions("-DHAVE_PROJ")
set(HAVE_PROJ ON)
include_directories(${PROJ_INC})
list(APPEND EXTERNAL_MODULE_DEPS libproj)
list(APPEND LIBS ${PROJ_LIB})
......@@ -85,12 +85,17 @@ if(ENABLE_PROJ)
BINARY_DIR unref/build
)
list(APPEND EXTERNAL_MODULE_DEPS unref)
add_definition(-DHAVE_UNREF)
set(HAVE_UNREF ON)
list(APPEND LIBS ${CMAKE_CURRENT_BINARY_DIR}/unref/build/libunref.a)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/unref/src/unref)
endif(ENABLE_UNREF)
endif(ENABLE_PROJ)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/slimFunctionConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/slimFunctionConfig.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
dg_add_module(dgSlimFunction "${SRC}" "${LIBS};${PYTHON_LIBRARY}")
dg_add_swig_module(slimFunction slimFunction.i dgSlimFunction)
if(ENABLE_PROJ)
......
......@@ -3,6 +3,7 @@
#include <fstream>
#include <float.h>
#include "function.h"
#include "slimFunctionConfig.h"
#ifdef HAVE_NETCDF
......
#ifndef _SLIM_EXPORTNETCDF_H_
#define _SLIM_EXPORTNETCDF_H_
#include "slimFunctionConfig.h"
/**
* \file slimExportNetCDF.h
* \brief Header for exporting solution in netCDF format/
......
#ifndef _SLIM_FES_H_
#define _SLIM_FES_H_
#include "slimFunctionConfig.h"
/**
* \file slimFES.h
......
#ifndef _SLIM_FUNCTION_H_
#define _SLIM_FUNCTION_H_
#include "slimFunctionConfig.h"
#include "function.h"
#include "stdint.h"
#include "dgDofContainer.h"
......
%module slimFunction
%{
#undef HAVE_DLOPEN
#include "slimFunctionConfig.h"
#include "ncDataDz.h"
#include "slimFunction.h"
#include "slimStructData.h"
......@@ -19,6 +20,7 @@
%import(module="dgpy.dgFunction") "functor.h"
%import(module="dgpy.dgFunction") "function.h"
%include "slimFunctionConfig.h"
%include "unrefMesher.h"
%rename (_print) print;
%include "ncDataDz.h"
......
#ifndef SLIM_FUNCTION_CONFIG_H_IN
#define SLIM_FUNCTION_CONFIG_H_IN
#cmakedefine HAVE_UNREF
#cmakedefine HAVE_NETCDF
#cmakedefine HAVE_FES
#cmakedefine FES_DATA
#cmakedefine HAVE_PROJ
#cmakedefine HAVE_UNREF
#endif
#ifndef _SLIM_GEBCO_H_
#define _SLIM_GEBCO_H_
#include "slimFunctionConfig.h"
#ifdef HAVE_NETCDF
/**Read the gebco bathymetry netcdf file generated with the interactive map available in https://www.bodc.ac.uk/data/online_delivery/gebco/select/ */
class slimFunctionGebco: public function {
......
#include "slimFunctionConfig.h"
#include "function.h"
#include "slimLonLat.h"
#include "functionGeneric.h"
......
#ifndef _SLIM_STRUCT_DATA_H_
#define _SLIM_STRUCT_DATA_H_
#include "slimFunctionConfig.h"
#include "slimDate.h"
#include <fstream>
#include <float.h>
......
#ifndef _SLIM_TPXO_H_
#define _SLIM_TPXO_H_
#include "slimFunctionConfig.h"
#include "slimStructData.h"
#include "dgDofContainer.h"
#include "dgGroupOfElements.h"
......
#include "slimFunctionConfig.h"
#ifdef HAVE_UNREF
#include <cmath>
#include "unref.h"
......
#ifndef UNREF_H_
#define UNREF_H_
#include "slimFunctionConfig.h"
#ifdef HAVE_UNREF
#include <string>
#include <map>
......
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