Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
cd1886a8
Commit
cd1886a8
authored
Nov 12, 2012
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cmake files and add for fmm api
parent
d41d80b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
10 deletions
+98
-10
Addons/FmmApi/CMakeLists.txt
Addons/FmmApi/CMakeLists.txt
+87
-0
CMakeLists.txt
CMakeLists.txt
+11
-0
Tests/CMakeLists.txt
Tests/CMakeLists.txt
+0
-10
No files found.
Addons/FmmApi/CMakeLists.txt
0 → 100644
View file @
cd1886a8
# 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 ./Build and tapes cmake ../"
)
endif
(
insource
)
project
(
Addons_fmmapi_scalfmm CXX
)
# Active language
# -----------------------
ENABLE_LANGUAGE
(
CXX
)
MESSAGE
(
STATUS
" CXX
${
CMAKE_CXX_COMPILER_ID
}
"
)
# Options
OPTION
(
SCALFMM_ADDON_FMMAPI
"Set to ON to build ScaFMM FMM API interface"
OFF
)
# if ask to build addon
if
(
SCALFMM_ADDON_FMMAPI
)
# first build lib scalfmmapi
set
(
LIBRARY_OUTPUT_PATH ../lib/
${
CMAKE_BUILD_TYPE
}
)
# Searching all cpp file
file
(
GLOB_RECURSE source_lib_files Src/*.cpp
)
# Adding cpp files to project
add_library
(
scalfmmapi STATIC
${
source_lib_files
}
)
# Add blas library (even if it is set to off)
target_link_libraries
(
scalfmmapi scalfmm
)
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/Src
)
# Install lib
install
(
TARGETS scalfmmapi ARCHIVE DESTINATION lib
)
# Install header
SET
(
my_include_dirs
"Src"
)
file
(
GLOB hpp_in_dir Src/*.hpp
)
INSTALL
(
FILES
${
hpp_in_dir
}
DESTINATION include/ScalFmm/FmmApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.cpp
)
INCLUDE_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/Src
)
# Then build test files
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 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
}
)
# link to scalfmm and scalfmmapi
target_link_libraries
(
${
execname
}
${
scalfmm_lib
}
scalfmmapi
${
BLAS_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
endif
()
endforeach
(
exec
)
endif
()
CMakeLists.txt
View file @
cd1886a8
...
...
@@ -32,6 +32,7 @@ OPTION( SCALFMM_BUILD_DEBUG "Set to ON to build in Debug" OFF )
OPTION
(
SCALFMM_USE_MEM_STATS
"Set to ON to profile memory"
OFF
)
OPTION
(
SCALFMM_USE_DOUBLE_PRECISION
"Set to ON to compile in double precision"
ON
)
OPTION
(
SCALFMM_ATTACHE_SOURCE
"Set to ON to compile with -g"
OFF
)
OPTION
(
SCALFMM_USE_ADDONS
"Set to ON to compile add ons"
OFF
)
# Test if openmp is here
...
...
@@ -120,6 +121,16 @@ endif()
# Build - doc
add_subdirectory
(
Doc
)
# Build - Addons
if
(
SCALFMM_USE_ADDONS
)
file
(
GLOB all_addons ./Addons/*
)
foreach
(
addon_name
${
all_addons
}
)
MESSAGE
(
STATUS
"Addons +=
${
addon_name
}
"
)
add_subdirectory
(
${
addon_name
}
)
endforeach
()
endif
()
# Add custom clean command
if
(
"
${
CMAKE_GENERATOR
}
"
MATCHES
"Make"
)
ADD_CUSTOM_TARGET
(
reset
...
...
Tests/CMakeLists.txt
View file @
cd1886a8
...
...
@@ -14,16 +14,6 @@ file(
./*.cpp
)
# Find all cuda files
if
(
SCALFMM_USE_CUDA
)
file
(
GLOB_RECURSE
source_cuda_files
./*.cu
)
endif
()
# Adding the project sources dir as an include dir
INCLUDE_DIRECTORIES
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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