From c51c84a558f0653b865969fee1b4528beea653bc Mon Sep 17 00:00:00 2001 From: Olivier Coulaud Date: Fri, 12 Sep 2014 16:08:03 +0200 Subject: [PATCH] Mv files --- Data/{ => noDist}/Readme | 0 Data/{ => noDist}/ellipsoid-bug.fma | 0 .../testNewCompareKernels.cpp | 0 Utils/CMakeLists.txt | 78 +++++++++++++++++++ {ToRemove => Utils}/email-sorted | 1 + 5 files changed, 79 insertions(+) rename Data/{ => noDist}/Readme (100%) rename Data/{ => noDist}/ellipsoid-bug.fma (100%) rename Tests/{Kernels => noDist}/testNewCompareKernels.cpp (100%) create mode 100755 Utils/CMakeLists.txt rename {ToRemove => Utils}/email-sorted (97%) diff --git a/Data/Readme b/Data/noDist/Readme similarity index 100% rename from Data/Readme rename to Data/noDist/Readme diff --git a/Data/ellipsoid-bug.fma b/Data/noDist/ellipsoid-bug.fma similarity index 100% rename from Data/ellipsoid-bug.fma rename to Data/noDist/ellipsoid-bug.fma diff --git a/Tests/Kernels/testNewCompareKernels.cpp b/Tests/noDist/testNewCompareKernels.cpp similarity index 100% rename from Tests/Kernels/testNewCompareKernels.cpp rename to Tests/noDist/testNewCompareKernels.cpp diff --git a/Utils/CMakeLists.txt b/Utils/CMakeLists.txt new file mode 100755 index 00000000..2d372f1e --- /dev/null +++ b/Utils/CMakeLists.txt @@ -0,0 +1,78 @@ +# 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(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 + ./*.cpp + ) + + +# Adding the project sources dir as an include dir +INCLUDE_DIRECTORIES( + ${CMAKE_BINARY_DIR}/Src + ${CMAKE_SOURCE_DIR}/Src +) + + +# Add execs - 1 cpp = 1 exec +foreach(exec ${source_tests_files}) + get_filename_component( + execname ${exec} + NAME_WE + ) + + set(compile_exec "TRUE") + + # Test Blas dependency + file(STRINGS "${exec}" lines_blas REGEX "@FUSE_BLAS") + if(lines_blas) + if( NOT ScalFMM_USE_BLAS ) + MESSAGE( STATUS "This needs BLAS = ${exec}" ) + set(compile_exec "FALSE") + endif() + endif() + + # Test FFT dependency + file(STRINGS "${exec}" lines_fft REGEX "@FUSE_FFT") + if(lines_fft) + if( NOT ScalFMM_USE_FFT ) + MESSAGE( STATUS "This needs FFT = ${exec}" ) + set(compile_exec "FALSE") + endif() + endif() + + # Test MPI dependency + file(STRINGS "${exec}" lines_mpi REGEX "@FUSE_MPI") + if(lines_mpi) + if( NOT ScalFMM_USE_MPI ) + MESSAGE( STATUS "This needs MPI = ${exec}" ) + set(compile_exec "FALSE") + endif() + endif() + + # 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() + +endforeach(exec) diff --git a/ToRemove/email-sorted b/Utils/email-sorted similarity index 97% rename from ToRemove/email-sorted rename to Utils/email-sorted index 4f0b77c2..f21bdd0b 100644 --- a/ToRemove/email-sorted +++ b/Utils/email-sorted @@ -33,6 +33,7 @@ shujin.cao@163.com t.ben.thompson@gmail.com t.betcke@ucl.ac.uk vitoreafeliciano@msn.com +wangjun5505@163.com weygand@kit.edu wgs@theworld.com zcos123@gmail.com -- GitLab