timedomainresonace/CMakeLists.txt

66 lines
2.1 KiB
CMake
Raw Normal View History

2014-11-11 08:31:13 +00:00
# CMakeList.txt for linear code
2015-02-10 07:17:40 +00:00
cmake_minimum_required (VERSION 3.1)
2014-11-11 08:31:13 +00:00
project(Timedomain1DEuler)
2015-02-10 07:17:40 +00:00
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(PythonLibs)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(CMAKE_SWIG_FLAGS "-Wall")
add_definitions(-DNDEBUG) #This is for BOOST functions, and to disable assertions!
# add_definitions(-DTRACER=0)
add_definitions(-DEIGEN_NO_DEBUG -DARMA_NO_DEBUG)
2015-02-10 07:17:40 +00:00
add_definitions(-DTRACERNAME=timedomaineulertracer -DARMA_USE_BLAS -DARMA_USE_LAPACK)
2014-11-11 08:31:13 +00:00
############################## Not so often changed
# -pipe Use pipes rather than temporary files for communication
# between the various stages of compilation. This fails to
# work on some systems where the assembler is unable to
# read from a pipe; but the GNU assembler has no troubl.
set (CMAKE_GCC " -Wno-unused-function -ffunction-sections -fdata-sections -Wno-unused-local-typedefs -Wno-empty-body")
2015-02-10 07:17:40 +00:00
set (CMAKE_GENERAL "${CMAKE_GENERAL} -march=native -std=c++11 -pipe -O2 -fPIC -Wall \
2014-11-11 08:31:13 +00:00
-Wextra -Wno-unused-parameter \
-Wno-unused-variable -Wno-unused-but-set-variable \
-Wno-return-local-addr -Wno-cpp -Wno-address")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_GENERAL} ${CMAKE_GCC}")
2015-01-27 09:00:35 +00:00
# link_directories(${link_directories} /usr/local/lib)
2015-01-29 06:44:19 +00:00
set (tdir /home/anne/wip/tmtubes/src)
2014-11-11 08:31:13 +00:00
include_directories(
2015-02-10 07:17:40 +00:00
# ${PYTHON_INCLUDE}
2015-01-29 06:44:19 +00:00
${tdir}/nonlinear/sys
${tdir}/nonlinear/seg
${tdir}/nonlinear/geom
${tdir}/nonlinear/geom/grid
${tdir}/common
${tdir}/common/gas
${tdir}/common/solid
2015-01-27 09:00:35 +00:00
src
2014-11-11 08:31:13 +00:00
)
AUX_SOURCE_DIRECTORY(src src)
2015-01-27 09:00:35 +00:00
link_directories(/home/anne/bin/lib)
2014-11-11 08:31:13 +00:00
2015-02-10 07:17:40 +00:00
add_library(sources ${src})
set_source_files_properties(timedomain.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(timedomain.i PROPERTIES SWIG_FLAGS "-py3")
set_source_files_properties(timedomain.i PROPERTIES SWIG_FLAGS "-Wextra")
set_source_files_properties(timedomain.i PROPERTIES SWIG_FLAGS "-includeall")
2015-02-10 07:17:40 +00:00
swig_add_module(timedomaineuler python timedomain.i)
swig_link_libraries(timedomaineuler sources nonlin armadillo ${PYTHON_LIBRARIES})
2014-11-11 08:31:13 +00:00