Commit 17158493 authored by ESTERIE Pierre's avatar ESTERIE Pierre

Merge branch 'cmake-refurb' into 'develop'

Merge cmake-refurb in develop

See merge request solverstack/ScalFMM!16
parents bfe02cab 7fd4f82d
image: hpclib/hiepacs image: hpclib/hiepacs
before_script:
- source /usr/share/modules/init/bash && source /usr/local/share/spack/setup-env.sh && spack load cmake@3.14.2
variables: variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
stages: stages:
- build - build
- pages
- test - test
- sonar - sonar
...@@ -19,8 +23,8 @@ build: ...@@ -19,8 +23,8 @@ build:
- cd Build && cmake .. - cd Build && cmake ..
-DSCALFMM_USE_LOG=ON -DSCALFMM_USE_LOG=ON
-DSCALFMM_USE_ASSERT=ON -DSCALFMM_USE_ASSERT=ON
-DSCALFMM_USE_SSE=OFF -DINASTEMP_USE_AVX2=OFF
-DSCALFMM_USE_AVX=OFF -DINASTEMP_USE_AVX=OFF
-DSCALFMM_USE_BLAS=ON -DSCALFMM_USE_BLAS=ON
-DSCALFMM_USE_FFT=ON -DSCALFMM_USE_FFT=ON
-DSCALFMM_USE_MPI=ON -DSCALFMM_USE_MPI=ON
...@@ -29,8 +33,8 @@ build: ...@@ -29,8 +33,8 @@ build:
-DSCALFMM_BUILD_TESTS=ON -DSCALFMM_BUILD_TESTS=ON
-DSCALFMM_BUILD_UTESTS=ON -DSCALFMM_BUILD_UTESTS=ON
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_C_COMPILER=gcc-6 -DCMAKE_C_COMPILER=gcc-7
-DCMAKE_CXX_COMPILER=g++-6 -DCMAKE_CXX_COMPILER=g++-7
- make -j5 2>&1 |tee scalfmm-build.log - make -j5 2>&1 |tee scalfmm-build.log
doc: doc:
...@@ -43,9 +47,22 @@ doc: ...@@ -43,9 +47,22 @@ doc:
script: script:
- cd Build && cmake .. - cd Build && cmake ..
-DSCALFMM_BUILD_DOC=ON -DSCALFMM_BUILD_DOC=ON
-DCMAKE_C_COMPILER=gcc-6 -DCMAKE_C_COMPILER=gcc-7
-DCMAKE_CXX_COMPILER=g++-6 -DCMAKE_CXX_COMPILER=g++-7
- make doc - make doc
pages:
stage: pages
dependencies:
- doc
artifacts:
paths:
- public
script:
- mkdir public
- mv Build/Doc/html/* public/
only:
- cmake-refurb
test: test:
stage: test stage: test
...@@ -78,4 +95,4 @@ sonar: ...@@ -78,4 +95,4 @@ sonar:
- source ./Utils/scripts/analysis.sh - source ./Utils/scripts/analysis.sh
- sonar-scanner |tee sonar.log; - sonar-scanner |tee sonar.log;
only: only:
- develop@solverstack/ScalFMM - develop@solverstack/ScalFMM
\ No newline at end of file
This diff is collapsed.
Subproject commit 33a182878f9049c47af1fce3e86e72b9a10e7f7a Subproject commit 41ca6a54d906b91b1a2439fe68d69f95cef89f9b
# helper function for generating targets
# This function creates an executable target with a list
# of sources and all requirements passed as arguments
# if the expression passed as boolean is true.
# ----------------------------------------------------
function(scalfmm_create_target target_name sources_list dependencies options )
# Here, we generate a vector of boolean to check if dependencies (targets)
# exists. 1 is yes, 0 otherwise
foreach(dep IN LISTS dependencies)
if(TARGET ${dep})
list(APPEND VECTOR_BOOL 1)
else()
list(APPEND VECTOR_BOOL 0)
endif()
endforeach()
# If all dependencies are met, we generate the target, otherwise not.
if(NOT 0 IN_LIST VECTOR_BOOL)
add_executable(${target_name} ${sources_list})
target_link_libraries(${target_name} PRIVATE ${dependencies})
target_compile_options(${target_name} PRIVATE ${options})
set_target_properties(${target_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BUILD_TYPE})
install(TARGETS ${target_name} RUNTIME DESTINATION bin)
endif()
endfunction(scalfmm_create_target)
set(CPACK_PACKAGE_VERSION_PATCH 0)
execute_process(
COMMAND git rev-list HEAD --count
OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH
RESULT_VARIABLE RET
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
#string_TRIM(PATCH1 PATCH)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "ON")
#
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE")
set(CPACK_PACKAGE_VERSION_MAJOR "${${CMAKE_PROJECT_NAME}_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${${CMAKE_PROJECT_NAME}_MINOR_VERSION}")
#
set(PACK_PACKAGE_VERSION "${${CMAKE_PROJECT_NAME}_VERSION}.${${CMAKE_PROJECT_NAME}_MINOR_VERSION}-${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "SCALFMM-${${CMAKE_PROJECT_NAME}_MAJOR_VERSION}.${${CMAKE_PROJECT_NAME}_MINOR_VERSION}-${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_IGNORE_FILES "\\\\.git;.DS_Store;.*~;/*.aux;/*.idx;/*.log;/*.out;/*.toc;/*.ilg;CMakeLists.txt.user;/.settings/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/Utils/;/Build*;/Obsolete/")
#
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
## INCLUDE(CTest) ## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "ScalFMM") set(CTEST_PROJECT_NAME "ScalFMM")
set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT") set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
set(CTEST_SUBMIT_URL "http://cdash.inria.fr/CDash/submit.php?project=scalfmm")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.inria.fr")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=scalfmm")
set(CTEST_DROP_SITE_CDASH TRUE)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# BUILDNAME variable construction # BUILDNAME variable construction
......
# check if compiling into source directories
INSTALL( FILES json.hpp DESTINATION include/Contribs )
INSTALL( DIRECTORY "inria" DESTINATION include )
...@@ -3,6 +3,7 @@ find_package(Doxygen) ...@@ -3,6 +3,7 @@ find_package(Doxygen)
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile-mcss ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-mcss COPYONLY)
add_custom_target( add_custom_target(
doc doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
......
@INCLUDE = Doxyfile
GENERATE_HTML = NO
GENERATE_XML = YES
XML_PROGRAMLISTINGS = NO
...@@ -658,7 +658,8 @@ WARN_LOGFILE = ...@@ -658,7 +658,8 @@ WARN_LOGFILE =
# with spaces. # with spaces.
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../Doc/Site_dox \ INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../Doc/Site_dox \
@CMAKE_CURRENT_SOURCE_DIR@/../Src/ \ @CMAKE_CURRENT_SOURCE_DIR@/../src/ \
@CMAKE_CURRENT_SOURCE_DIR@/../include/ \
@CMAKE_CURRENT_SOURCE_DIR@/../Examples/ \ @CMAKE_CURRENT_SOURCE_DIR@/../Examples/ \
@CMAKE_CURRENT_SOURCE_DIR@/../Tests/ @CMAKE_CURRENT_SOURCE_DIR@/../Tests/
......
# check if compiling into source directories # Examples
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) # --------
if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto scalfmm/Build and tapes cmake ../") # List of source files
endif(insource) set(source_tests_files
changeFmaFormat.cpp
ChebyshevHybridFMM.cpp
ChebyshevOpenMPAdaptiveFMM.cpp
ChebyshevOpenMPFMM.cpp
ChebyshevStarpuImplicit.cpp
compare2Files.cpp
compareAllPoissonKernels.cpp
CutOffAlgorithm.cpp
DirectComputation.cpp
generateDistributions.cpp
LagrangeHybridFMM.cpp
LagrangeInterpolationAdaptiveFMM.cpp
LagrangeOpenMPFMM.cpp
LagrangeStarpuImplicit.cpp
RotationFMM.cpp
RotationMPIFMM.cpp
statisticsOnOctree.cpp
)
project(EXAMPLES_SCALFMM CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
#ADD_DEFINITIONS( ${SCALFMM_CXX_FLAGS})
# Adding the project sources dir as an include dir
INCLUDE_DIRECTORIES(
${SCALFMM_BINARY_DIR}/Src
${SCALFMM_SOURCE_DIR}/Src
${SCALFMM_SOURCE_DIR}/Contribs
${SCALFMM_SOURCE_DIR}
${SCALFMM_INCLUDES}
)
# Find all code files
file(
GLOB_RECURSE
source_tests_files
./*.cpp
)
# Add execs - 1 cpp = 1 exec # Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files}) foreach(exec ${source_tests_files})
get_filename_component( set(compile_exec TRUE)
execname ${exec} get_filename_component( execname ${exec} NAME_WE )
NAME_WE
) foreach(fuse_key ${FUSE_DEP_AVAILABLE})
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}")
set(compile_exec "TRUE") if(lines_fuse AND NOT ${fuse_key} IN_LIST FUSE_LIST)
message( STATUS "This needs ${fuse_key} = ${exec}" )
foreach(fuse_key ${FUSE_LIST}) set(compile_exec FALSE)
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}") endif()
if(lines_fuse) endforeach()
if( NOT SCALFMM_USE_${fuse_key} )
MESSAGE( STATUS "This needs ${fuse_key} = ${exec}" ) # Dependency are OK
set(compile_exec "FALSE") if( compile_exec )
endif() add_executable( ${execname} ${exec})
endif() list(APPEND SCALFMM_EXAMPLES_TARGETS ${execname})
endforeach() list(APPEND SCALFMM_TESTS_TARGETS ${execname})
set_target_properties(${execname} PROPERTIES ENABLE_EXPORTS TRUE
# Dependency are OK RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BUILD_TYPE}
if( compile_exec ) )
add_executable( target_link_libraries( ${execname} PRIVATE ${CMAKE_PROJECT_NAME})
${execname} install(TARGETS ${execname} RUNTIME DESTINATION bin)
${exec} endif()
)
SET_TARGET_PROPERTIES(${execname} PROPERTIES ENABLE_EXPORTS TRUE)
target_link_libraries(
${execname}
${scalfmm_lib}
${SCALFMM_LIBRARIES}
)
install( TARGETS ${execname} DESTINATION bin )
endif()
endforeach(exec) endforeach(exec)
#set(GENERIC_SOURCE_FILES changeFmaFormat compare2Files generateDistributions statisticsOnOctree add_custom_target(scalfmm_examples ALL DEPENDS ${SCALFMM_EXAMPLES_TARGETS})
# 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(STATUS " &&&&&&&&&&&&&&&&&&&& SCALFMM_USE_FFT ${SCALFMM_USE_FFT}")
#endif(SCALFMM_USE_FFT)
#if(SCALFMM_USE_MPI)
# set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} RotationMPIFMM )
# if(SCALFMM_USE_BLAS)
# set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} MPIChebyshevInterpolationFMM ChebyshevInterpolationMPIFMMSplit ChebyshevInterpolationMPIFMM )
# endif(SCALFMM_USE_BLAS)
# if(SCALFMM_USE_FFT)
# set(GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES} MPIUniformInterpolationFMM)
# endif(SCALFMM_USE_FFT)
#endif()
##
##MESSAGE(WARNIG "GENERIC_SOURCE_FILES ${GENERIC_SOURCE_FILES}")
##
##
##
#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)
#-----------------------------------------------------------------------------
#
# SCALFMMConfig.cmake - SCALFMM CMake configuration file for external projects.
#
# This file is configured by SCALFMM and used by the SCALFMM.cmake module
# to load SCALFMM's settings for an external project.
#
@SCALFMM_CONFIG_INSTALL_ONLY@
#
SET(SCALFMM_VERSION_MAJOR "@SCALFMM_MAJOR_VERSION@")
SET(SCALFMM_VERSION_MINOR "@SCALFMM_MINOR_VERSION@")
SET(SCALFMM_VERSION_BUILD "@SCALFMM_BUILD_VERSION@")
#
SET(SCALFMM_PREFIX "@CMAKE_INSTALL_PREFIX@")
SET(SCALFMM_INCLUDES_DIR "@CMAKE_INSTALL_PREFIX@/include")
SET(SCALFMM_INCLUDES_ADD "@SCALFMM_INCLUDES@")
SET(SCALFMM_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/lib")
SET(SCALFMM_LIBRARIES_ADD "@SCALFMM_COMPILE_LIBS@")
SET(SCALFMM_LIBRARY_NAME "@scalfmm_lib@")
SET(SCALFMM_CXX_FLAGS "@SCALFMM_CXX_FLAGS@ @CMAKE_CXX_FLAGS@")
#
SET(SCALFMM_SOURCE_DIR "@SCALFMM_SOURCE_DIR@")
SET(SCALFMM_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
SET(SCALFMM_USE_FILE "@SCALFMM_USE_FILE@")
#
SET(SCALFMM_BUILD_TYPE "@CMAKE_BUILD_TYPE@")
#
# SCALFMM Options
#
SET(SCALFMM_USE_ADDONS "@SCALFMM_USE_ADDONS@")
SET(SCALFMM_USE_MPI "@SCALFMM_USE_MPI@")
SET(SCALFMM_USE_BLAS "@SCALFMM_USE_BLAS@")
SET(SCALFMM_USE_FFT "@SCALFMM_USE_FFT@")
SET(SCALFMM_USE_MKL "@SCALFMM_USE_MKL_AS_BLAS@")
SET(SCALFMM_FLAGS "@SCALFMM_FLAGS_OPTI@")
SET(SCALFMM_USE_MEM_STATS "@SCALFMM_USE_MEM_STATS@")
SET(SCALFMM_USE_LOG "@SCALFMM_USE_LOG@")
SET(SCALFMM_USE_OMP4 "@SCALFMM_USE_OMP4@")
SET(SCALFMM_USE_STARPU "@SCALFMM_USE_STARPU@")
SET(SCALFMM_USE_SSE "@SCALFMM_USE_SSE@")
SET(SCALFMM_USE_AVX "@SCALFMM_USE_AVX@")
#
SET(SCALFMM_DOC_TAGS "@CMAKE_BINARY_DIR@/Doc/scalfmm.tag")
#
IF(SCALFMM_USE_ADDONS)
SET(SCALFMM_LIBRARIES "-L${SCALFMM_LIBRARIES_DIR} -l${SCALFMM_LIBRARY_NAME} ${SCALFMM_LIBRARIES_ADD}" )
ELSE()
SET(SCALFMM_LIBRARIES "-L${SCALFMM_LIBRARIES_DIR} -l${SCALFMM_LIBRARY_NAME}" )
ENDIF()
#SCALFMM_BUILD_TESTS => OFF
#SCALFMM_BUILD_UTESTS => OFF
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto scalfmm/Build and tapes cmake ../")
endif(insource)
project(TESTS_SCALFMM CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
ADD_DEFINITIONS( ${ScaLFMM_CXX_FLAGS})
# Find all code files # Find all code files
file( set(source_tests_files
GLOB_RECURSE GroupTree/compareDAGmapping.cpp
source_tests_files GroupTree/testBlockedAlgorithm.cpp
./*.cpp GroupTree/testBlockedAlgorithmDyn.cpp
) GroupTree/testBlockedChebyshev.cpp
GroupTree/testBlockedMpiAlgorithm.cpp
GroupTree/testBlockedMpiChebyshev.cpp
# Adding the project sources dir as an include dir GroupTree/testBlockedMpiInterpolation.cpp
INCLUDE_DIRECTORIES( GroupTree/testBlockedMpiUniform.cpp
${SCALFMM_BINARY_DIR}/Src GroupTree/testBlockedRotationCompare.cpp
${SCALFMM_SOURCE_DIR}/Src GroupTree/testBlockedRotation.cpp
${SCALFMM_SOURCE_DIR}/Contribs GroupTree/testBlockedRotationCuda.cpp
${SCALFMM_SOURCE_DIR} GroupTree/testBlockedRotationMpi.cpp
${SCALFMM_INCLUDES} GroupTree/testBlockedRotationMpiCuda.cpp
) GroupTree/testBlockedSpeedOperators.cpp
GroupTree/testBlockedTaylor.cpp
GroupTree/testBlockedTree.cpp
GroupTree/testBlockedUnifCudaBench.cpp
GroupTree/testBlockedUnifCuda.cpp
GroupTree/testBlockedUniformBench.cpp
GroupTree/testBlockedUniformCompare.cpp
GroupTree/testBlockedUniform.cpp
GroupTree/testBlockedWithCudaAlgorithm.cpp
GroupTree/testBlockedWithOpenCLAlgorithm.cpp
Kernels/DirectAlgorithm.cpp
Kernels/testChebAlgorithm.cpp
Kernels/testChebAlgorithmProc.cpp
Kernels/testChebTensorialAlgorithm.cpp
Kernels/testFlopsChebAlgorithm.cpp
Kernels/testOmniPath.cpp
Kernels/testP2PEfficency.cpp
Kernels/testRotationAlgorithm.cpp
Kernels/testRotationAlgorithmProc.cpp
Kernels/testRotationPeriodicBench.cpp
Kernels/testSmoothUnifAlgorithm.cpp
Kernels/testSphericalAlgorithm.cpp
Kernels/testSphericalBench.cpp
Kernels/testSphericalBlasAlgorithm.cpp
Kernels/testSphericalBlockBlasAlgorithm.cpp
Kernels/testSphericalDlpolyAlgorithm.cpp
Kernels/testSphericalGalaxyCsv.cpp
Kernels/testSphericalProcAlgorithm.cpp
Kernels/testSphericalRotationAlgorithm.cpp
Kernels/testTaylor.cpp
Kernels/testTaylorKernel.cpp
Kernels/testTaylorSimple.cpp
Kernels/testTsmAlgorithm.cpp
Kernels/testTuneSphericalBlockBlas.cpp
Kernels/testUnifAlgorithm.cpp
Kernels/testUnifAlgorithmProc.cpp
Kernels/testUnifTensorialAlgorithm.cpp
Utils/testBlas.cpp
Utils/testChebBinaryM2L.cpp
Utils/testChebBinarySymM2L.cpp
Utils/testChebInterpolator.cpp
Utils/testChebInterpolatorExtendedBBox.cpp
Utils/testChebM2Lprecomputation.cpp
Utils/testChebOctree.cpp
Utils/testChebSxUCBSy.cpp
Utils/testChebSymmetries.cpp
Utils/testChebTensorProduct.cpp
Utils/testCompareIOTree.cpp
Utils/testDebug.cpp
Utils/testFastDiscreteConvolution.cpp
Utils/testFFT.cpp
Utils/testFmmAlgorithm.cpp
Utils/testFmmAlgorithmOmp4.cpp
Utils/testFmmAlgorithmPeriodic.cpp
Utils/testFmmAlgorithmProc.cpp
Utils/testFmmAlgorithmProcPeriodic.cpp
Utils/testFmmAlgorithmProcRandom.cpp
Utils/testFmmAlgorithmProcRotation.cpp
Utils/testFmmAlgorithmProcTsm.cpp
Utils/testFmmAlgorithmTsm.cpp
Utils/testLapack.cpp
Utils/testLapackQR.cpp
Utils/testLoader.cpp
Utils/testLoaderFMATsm.cpp
Utils/testLoaderFMATsmCreate.cpp
Utils/testMemStats.cpp
Utils/testMpiCsvSaver.cpp
Utils/testOctree.cpp
Utils/testOctreeFuncteur.cpp
Utils/testOctreeIter.cpp
Utils/testOctreeParallelFuncteur.cpp
Utils/testOctreePrintMorton.cpp
Utils/testOctreeRearrange.cpp
Utils/testOctreeRearrangePeriodic.cpp
Utils/testOctreeRearrangeProc.cpp
Utils/testOctreeRearrangeTsm.cpp
Utils/testParameterNames.cpp
Utils/testPartitionsMapping.cpp
Utils/testStatsTree.cpp
Utils/testTemplateExample.cpp
Utils/testTic.cpp
Utils/testTreeBuilderThread.cpp
Utils/testTreeIO.cpp
Utils/testUnifInterpolator.cpp
Utils/testUnifTensorialInterpolator.cpp
)
# Add execs - 1 cpp = 1 exec # Add execs - 1 cpp = 1 exec
foreach(exec ${source_tests_files}) foreach(exec ${source_tests_files})
get_filename_component( set(compile_exec TRUE)
execname ${exec} get_filename_component( execname ${exec} NAME_WE )
NAME_WE
)
set(compile_exec "TRUE")
foreach(fuse_key ${FUSE_LIST}) foreach(fuse_key ${FUSE_DEP_AVAILABLE})
file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}") file(STRINGS "${exec}" lines_fuse REGEX "@FUSE_${fuse_key}")
if(lines_fuse) if(lines_fuse AND NOT ${fuse_key} IN_LIST FUSE_LIST)
if( NOT SCALFMM_USE_${fuse_key} ) message( STATUS "This needs ${fuse_key} = ${exec}" )
MESSAGE( STATUS "This needs ${fuse_key} = ${exec}" ) set(compile_exec FALSE)
set(compile_exec "FALSE") endif()
endif() endforeach()
endif()
endforeach()
# Dependency are OK # Dependency are OK
if( compile_exec ) if( compile_exec )
add_executable( add_executable( ${execname} ${exec})
${execname} list(APPEND SCALFMM_TESTS_TARGETS ${execname})
${exec} set_target_properties(${execname} PROPERTIES ENABLE_EXPORTS TRUE
) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BUILD_TYPE}
SET_TARGET_PROPERTIES(${execname} PROPERTIES ENABLE_EXPORTS TRUE) )
target_link_libraries( target_link_libraries( ${execname} ${CMAKE_PROJECT_NAME})
${execname} endif()
${scalfmm_lib}
${SCALFMM_LIBRARIES}
)
endif()
endforeach(exec) endforeach(exec)