Commit 96a6290d authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

cmakelists

parent c5029083
......@@ -11,10 +11,10 @@ set(GTEST_LIB gtest gtest_main)
# MPI
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH}) #/usr/include/mpi/
include_directories(${MPI_INCLUDE_PATH})
set(CMAKE_C_COMPILER mpicc) #/usr/bin/mpicc
set(CMAKE_CXX_COMPILER mpiCC) #/usr/bin/mpiCC
set(CMAKE_C_COMPILER ${MPI_C_COMPILER})
set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
......@@ -28,8 +28,7 @@ set(CMAKE_CXX_FLAGS "-fPIC -g -Wno-deprecated -std=gnu++11")
#---------------------------------------------------------------------------------------#
# Blas Lapack
#Cmake can't find FFTW3 for some reason but is able to link it
#find_package(FFTW3 REQUIRED)
#find_package(FFTW3 REQUIRED) (Can't be found but still seems to link in)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
#---------------------------------------------------------------------------------------#
......@@ -42,14 +41,25 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/data/dual)
#---------------------------------------------------------------------------------------#
# Include directories
include_directories(${PROJECT_SOURCE_DIR}/mpp/src)
include_directories(${PROJECT_SOURCE_DIR}/mpp/LIB_PS)
include_directories(${PROJECT_SOURCE_DIR}/mpp/superlu/include)
include_directories(${PROJECT_SOURCE_DIR}/mlmc/src)
include_directories(${PROJECT_SOURCE_DIR}/sprng5/include)
include_directories(${PROJECT_SOURCE_DIR}/mpp/src)
#---------------------------------------------------------------------------------------#
# Link libraries
link_directories(${PROJECT_SOURCE_DIR}/sprng5/lib)
link_directories(${PROJECT_SOURCE_DIR}/superlu/lib)
if (UNIX AND NOT APPLE)
set(SUPERLU superlu_4.3)
elseif (APPLE)
set(SUPERLU superlu_4.3_mac10.10)
elseif (WIN32)
set(SUPERLU superlu_4.3_cygwin)
endif ()
#---------------------------------------------------------------------------------------#
# Subdirectories
add_subdirectory(mpp)
add_subdirectory(mlmc/src)
#---------------------------------------------------------------------------------------#
......@@ -57,7 +67,7 @@ add_subdirectory(mlmc/src)
add_executable(MLMC-M++ mlmc/src/MLMCMain.C)
# Linking
target_link_libraries(MLMC-M++ MLMC sprng mpp lib_ps blas lapack ${SUPERLU} fftw3 m)
target_link_libraries(MLMC-M++ MLMC sprng SRC LIB_PS ${SUPERLU} blas lapack fftw3 m)
#---------------------------------------------------------------------------------------#
# Test Executables
......
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