Commit dee162cc authored by COULAUD Olivier's avatar COULAUD Olivier

New CMakeList.txt for example - now we have all files with qt-creator on Ma OsX

Fix bug with constexpr ans string
New Macro for API2 of ScalFMM for cells and kernels classes
parent b2a42238
......@@ -334,6 +334,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
##############################################################################
#
if( SCALFMM_USE_BLAS )
# if(APPLE) # In order to use QT-creator on macos
# list(APPEND CMAKE_REQUIRED_INCLUDES $ENV{MKLROOT}/include)
# endif()
# include(FortranCInterface)
# # Define a Fortran interface file (FCMangle.hpp)
# FortranCInterface_HEADER( ${CMAKE_CURRENT_SOURCE_DIR}/Src/FCMangle.hpp
......@@ -450,7 +454,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
#
# FFT option
#
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_MKL_AS_FFTW "Set to ON to use MKL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS" OFF )
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_MKL_AS_FFTW "Set to ON to use MKL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_MKL_AS_BLAS" OFF )
CMAKE_DEPENDENT_OPTION(SCALFMM_USE_ESSL_AS_FFTW "Set to ON to use ESSL FFTW" ON "SCALFMM_USE_FFT;SCALFMM_USE_ESSL_AS_BLAS" OFF )
if( SCALFMM_USE_FFT )
message(STATUS "SCALFMM USE FFT Configure:")
......@@ -459,8 +463,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/morse/
# MKL, ESSL, THREADS|OMP and/or SIMPLE|LONG|QUAD
# Default will find the real double precision fftw library version without THREADS|OMP
if( SCALFMM_USE_MKL_AS_FFTW )
message(STATUS " SCALFMM USE FFT from MKL")
find_package(FFTW COMPONENTS MKL)
MESSAGE(WARNING "&&&& &&&& FFTW_FOUND ${FFTW_FOUND}")
elseif (SCALFMM_USE_ESSL_AS_FFTW)
message(STATUS " SCALFMM USE FFT from ESSL ")
find_package(FFTW COMPONENTS ESSL)
......
......@@ -8,6 +8,9 @@ project(EXAMPLES_SCALFMM CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
#ADD_DEFINITIONS( ${SCALFMM_CXX_FLAGS})
# Find all code files
file(
GLOB_RECURSE
source_tests_files
......@@ -21,42 +24,35 @@ INCLUDE_DIRECTORIES(
${SCALFMM_INCLUDES}
)
set(GENERIC_SOURCE_FILES changeFmaFormat generateDistributions statisticsOnOctree DirectComputation CutOffAlgorithm RotationFMM compareAllPoissonKernels)
if(SCALFMM_USE_BLAS)
set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} ChebyshevInterpolationFMM ChebyshevInterpolationAdaptiveFMM )
endif(SCALFMM_USE_BLAS)
if(SCALFMM_USE_FFT)
set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} UniformInterpolationFMM LagrangeInterpolationAdaptiveFMM )
else()
message(WARNING " &&&&&&&&&&&&&&&&&&&& SCALFMM_USE_FFT ${SCALFMM_USE_FFT}")
endif(SCALFMM_USE_FFT)
# Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files})
get_filename_component(
execname ${exec}
NAME_WE
)
if(SCALFMM_USE_MPI)
set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} RotationMPIFMM )
if(SCALFMM_USE_BLAS)
set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} ChebyshevInterpolationMPIFMMSplit ChebyshevInterpolationMPIFMM )
endif(SCALFMM_USE_BLAS)
if(SCALFMM_USE_FFT)
set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} UniformInterpolationFMM LagrangeInterpolationAdaptiveFMM )
endif(SCALFMM_USE_FFT)
set(compile_exec "TRUE")
foreach(fuse_key ${FUSE_LIST})
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}")
if(lines_fuse)
if( NOT SCALFMM_USE_${fuse_key} )
MESSAGE( STATUS "This needs ${fuse_key} = ${exec}" )
set(compile_exec "FALSE")
endif()
endif()
endforeach()
# Dependency are OK
if( compile_exec )
add_executable(
${execname}
${exec}
)
SET_TARGET_PROPERTIES(${execname} PROPERTIES ENABLE_EXPORTS TRUE)
target_link_libraries(
${execname}
${scalfmm_lib}
${SCALFMM_LIBRARIES}
)
# Install bin
install( TARGETS ${execname} DESTINATION bin )
endif()
endif()
#
#
#
foreach(exec ${GENERIC_SOURCE_FILES})
add_executable(${exec} ${exec}.cpp)
SET_TARGET_PROPERTIES(${exec} PROPERTIES ENABLE_EXPORTS TRUE)
target_link_libraries(${exec} ${scalfmm_lib} ${SCALFMM_LIBRARIES} )
install( TARGETS ${exec} DESTINATION bin )
endforeach(exec)
......@@ -28,6 +28,6 @@ using FInterpolationKernel = FChebSymKernel<FReal,
GroupContainerClass,
MatrixKernelClass,
ORDER> ;
const std::string interpolationType="Chebyshev interpolation";
const std::string interpolationType("Chebyshev interpolation");
#include "sharedMemoryInterpolationFMM.hpp"
......@@ -29,6 +29,6 @@ using FInterpolationKernel = FUnifKernel<FReal,
GroupContainerClass,
MatrixKernelClass,
ORDER> ;
constexpr std::string interpolationType="Uniform interpolation";
const std::string interpolationType("Uniform interpolation");
#include "sharedMemoryInterpolationFMM.hpp"
......@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////
#define SCALFMM_API_2.0
#define SCALFMM_API_2
///////////////////////////////////////////////////////
// Debug
......
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