-
Notifications
You must be signed in to change notification settings - Fork 61
/
CMakeLists.txt
54 lines (43 loc) · 1.91 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# src/madness/mra
add_definitions(-DMRA_DATA_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
# Set the MRA sources and header files
set(MADMRA_HEADERS
adquad.h funcimpl.h indexit.h legendre.h operator.h vmra.h
funcdefaults.h key.h mra.h power.h qmprop.h twoscale.h lbdeux.h
mraimpl.h funcplot.h function_common_data.h function_factory.h
function_interface.h gfit.h convolution1d.h simplecache.h derivative.h
displacements.h functypedefs.h sdf_shape_3D.h sdf_domainmask.h vmra1.h
leafop.h nonlinsol.h)
set(MADMRA_SOURCES
mra1.cc mra2.cc mra3.cc mra4.cc mra5.cc mra6.cc startup.cc legendre.cc
twoscale.cc qmprop.cc)
# Create the MADmra library
add_mad_library(mra MADMRA_SOURCES MADMRA_HEADERS "linalg;tinyxml;muparser" "madness/mra")
# Create executables
add_executable(mraplot mraplot.cc)
target_link_libraries(mraplot MADmra)
# Install the MADmra library
install(TARGETS mraplot DESTINATION "${MADNESS_INSTALL_BINDIR}")
install(FILES autocorr coeffs gaussleg
DESTINATION "${MADNESS_INSTALL_DATADIR}"
COMPONENT mra)
# Add unit tests
if(ENABLE_UNITTESTS)
# The list of unit test source files
add_library(libtest_sepop EXCLUDE_FROM_ALL test_sepop.cc)
target_link_libraries(libtest_sepop MADmra)
set(MRA_TEST_SOURCES testbsh.cc testproj.cc
testpdiff.cc testdiff1Db.cc testgconv.cc testopdir.cc testinnerext.cc
testgaxpyext.cc testvmra.cc)
add_unittests(mra MRA_TEST_SOURCES "MADmra;MADgtest")
set(MRA_SEPOP_TEST_SOURCES testsuite.cc
testper.cc)
add_unittests(mra_sepop MRA_SEPOP_TEST_SOURCES "libtest_sepop;MADmra;MADgtest")
# Test executables that are not run with unit tests
set(MRA_OTHER_TESTS testperiodic testbc testqm test6
testdiff1D testdiff2D testdiff3D)
foreach(_test ${MRA_OTHER_TESTS})
add_executable(${_test} EXCLUDE_FROM_ALL ${_test}.cc)
target_link_libraries(${_test} MADmra "${DISABLEPIE_LINKER_FLAG}")
endforeach()
endif()