Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
081896da
Commit
081896da
authored
Apr 29, 2020
by
niklas.baumgarten
Browse files
updated cmake run
parent
d2426525
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
081896da
cmake_minimum_required
(
VERSION 3.5.1
)
project
(
MLMC
)
#---------------------------------------------------------------------------------------#
set
(
CMAKE_CXX_FLAGS_DISTRIBUTION
"-O0"
)
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O1")
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")
# Compiler options
#set(CXX_VERSION "17")
#set(COMPILER_VERSION "c++")
#set(COMPILER_VERSION "gnu++")
#set(COMPILER_OPTIMIZE "-O0")
#set(COMPILER_OPTIMIZE "-O1")
#set(COMPILER_OPTIMIZE "-O2")
set
(
COMPILER_OPTIMIZE
"-O3"
)
#set(COMPILER_OPTIMIZE "-Ofast")
option
(
NO_DEPRECATED
"Suppress deprecated warnings"
ON
)
option
(
NO_DEPRECATED
"Suppress deprecated warnings"
OFF
)
option
(
BUILD_TESTS
"Build test executables"
ON
)
option
(
USE_CXSC
"Use interval arithmetic library cxsc"
OFF
)
option
(
PROBLEM_NO_TIME
"Time independent problem"
OFF
)
# Problem options
option
(
PROBLEM_NO_TIME
"Time independent problem"
ON
)
option
(
PROBLEM_1D
"1 dimensional problem"
OFF
)
option
(
PROBLEM_2D
"2 dimensional problem"
OFF
)
option
(
PROBLEM_2D
"2 dimensional problem"
ON
)
option
(
AFFINE_LINEAR_TRAFO
"Only affine linear transformations"
ON
)
# Constants
#set(CONST_GEOMETRIC_TOLERANCE "1e-10")
#set(CONST_NEAR_ZERO "1e-15")
#set(CONST_VERY_LARGE "1e30")
#set(CONST_INFTY "1e100")
# SuperLU options
option
(
USE_SUPERLU30
"Use SuperLU 3.0 (old version)"
OFF
)
option
(
AFFINE_LINEAR_TRAFO
"Only affine linear transformations"
OFF
)
# Test options
option
(
BUILD_TESTS
"Build test executables"
OFF
)
option
(
BUILD_MLMC_TESTS
"Build mlmc test executables"
ON
)
#---------------------------------------------------------------------------------------#
# Set path for mpp
set
(
PROJECT_MPP_DIR
${
PROJECT_SOURCE_DIR
}
/mpp
)
...
...
@@ -26,19 +42,24 @@ include(${PROJECT_MPP_DIR}/CMakeListsMpp.inc)
#find_package(FFTW3 REQUIRED) (Can't be found but still seems to link in)
link_directories
(
${
PROJECT_SOURCE_DIR
}
/sprng5/lib
)
# Include directories
include_directories
(
${
PROJECT_SOURCE_DIR
}
/sprng5/include
)
include_directories
(
${
PROJECT_SOURCE_DIR
}
/mlmc/src
)
# Subdirector
ies
# Subdirector
y
add_subdirectory
(
mlmc/src
)
add_subdirectory
(
tests
)
#---------------------------------------------------------------------------------------#
# Libraries
set
(
MLMC_LIBRARIES MLMC sprng fftw3 m
${
MPP_LIBRARIES
}
)
# Executables
add_executable
(
MLMC-M++ mlmc/src/Main.cpp
)
# Linking
target_link_libraries
(
MLMC-M++ MLMC sprng SRC LIB_PS
${
SUPERLU
}
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
fftw3 m
)
#---------------------------------------------------------------------------------------#
target_link_libraries
(
MLMC-M++
${
MLMC_LIBRARIES
}
)
# Tests
if
(
BUILD_MLMC_TESTS
)
add_subdirectory
(
tests
)
endif
()
tests/CMakeLists.txt
View file @
081896da
# Includes for mlmc tests
#---------------------------------------------------------------------------------------#
# Manage folder structure build folder
file
(
MAKE_DIRECTORY
${
PROJECT_BINARY_DIR
}
/tests/data/vtk
)
file
(
MAKE_DIRECTORY
${
PROJECT_BINARY_DIR
}
/tests/data/gp
)
...
...
@@ -8,9 +5,6 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/tests/data/py)
file
(
MAKE_DIRECTORY
${
PROJECT_BINARY_DIR
}
/tests/log
)
file
(
MAKE_DIRECTORY
${
PROJECT_BINARY_DIR
}
/tests/data/dual
)
set
(
libs MLMC sprng SRC LIB_PS fftw3 m
${
SUPERLU
}
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
${
GTEST_LIB
}
)
# Test Executables
add_executable
(
TestMainProgram TestMainProgram.cpp
)
add_executable
(
BenchmarkEllipticResults BenchmarkEllipticResults.cpp
)
...
...
@@ -18,8 +12,7 @@ add_executable(BenchmarkTransportResults BenchmarkTransportResults.cpp)
add_executable
(
TestMultilevelPlotter TestMultilevelPlotter.cpp
)
# Linking
target_link_libraries
(
TestMainProgram
${
libs
}
)
target_link_libraries
(
BenchmarkEllipticResults
${
libs
}
)
target_link_libraries
(
BenchmarkTransportResults
${
libs
}
)
target_link_libraries
(
TestMultilevelPlotter
${
libs
}
)
#---------------------------------------------------------------------------------------#
target_link_libraries
(
TestMainProgram
${
MLMC_LIBRARIES
}
${
GTEST_LIB
}
)
target_link_libraries
(
BenchmarkEllipticResults
${
MLMC_LIBRARIES
}
${
GTEST_LIB
}
)
target_link_libraries
(
BenchmarkTransportResults
${
MLMC_LIBRARIES
}
${
GTEST_LIB
}
)
target_link_libraries
(
TestMultilevelPlotter
${
MLMC_LIBRARIES
}
${
GTEST_LIB
}
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment