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
78807cc5
Commit
78807cc5
authored
Feb 05, 2015
by
PIACIBELLO Cyrille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set cKernelApi vaiable inside the main CMakeList, in order to build the C api without using ccmake
parent
953a3dd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
61 deletions
+60
-61
Addons/CKernelApi/CMakeLists.txt
Addons/CKernelApi/CMakeLists.txt
+58
-61
CMakeLists.txt
CMakeLists.txt
+2
-0
No files found.
Addons/CKernelApi/CMakeLists.txt
View file @
78807cc5
...
...
@@ -12,74 +12,71 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ScaLFMM_CXX_FLAGS}")
ENABLE_LANGUAGE
(
CXX C
)
MESSAGE
(
STATUS
" CXX
${
CMAKE_CXX_COMPILER_ID
}
"
)
# Options
OPTION
(
SCALFMM_ADDON_CKERNELAPI
"Set to ON to build ScaFMM FMM API interface"
OFF
)
# if ask to build addon
if
(
S
CAL
FMM_ADDON_CKERNELAPI
)
# first build lib scalfmmckernelapi
set
(
LIBRARY_OUTPUT_PATH ../lib/
${
CMAKE_BUILD_TYPE
}
)
if
(
S
cal
FMM_ADDON_CKERNELAPI
)
# first build lib scalfmmckernelapi
set
(
LIBRARY_OUTPUT_PATH ../lib/
${
CMAKE_BUILD_TYPE
}
)
# Searching all cpp file
file
(
GLOB_RECURSE source_lib_files Src/*.cpp
)
# Searching all cpp file
file
(
GLOB_RECURSE source_lib_files Src/*.cpp
)
# Adding cpp files to project
add_library
(
scalfmmckernelapi STATIC
${
source_lib_files
}
)
# Adding cpp files to project
add_library
(
scalfmmckernelapi STATIC
${
source_lib_files
}
)
# Add blas library (even if it is set to off)
target_link_libraries
(
scalfmmckernelapi scalfmm
)
# Add blas library (even if it is set to off)
target_link_libraries
(
scalfmmckernelapi scalfmm
)
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/Src
${
CMAKE_SOURCE_DIR
}
/Src
# Adding the entire project dir as an include dir
INCLUDE_DIRECTORIES
(
${
CMAKE_BINARY_DIR
}
/Src
${
CMAKE_SOURCE_DIR
}
/Src
${
SCALFMM_INCLUDES
}
)
# Install lib
install
(
TARGETS scalfmmckernelapi 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/CKernelApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.c
)
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"
)
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
}
)
# link to scalfmm and scalfmmckernelapi
target_link_libraries
(
${
execname
}
${
scalfmm_lib
}
scalfmmckernelapi
# ${BLAS_LIBRARIES}
# ${LAPACK_LIBRARIES}
${
SCALFMM_LIBRARIES
}
)
endif
()
endforeach
(
exec
)
endif
()
# Install lib
install
(
TARGETS scalfmmckernelapi 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/CKernelApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.c
)
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"
)
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
}
)
# link to scalfmm and scalfmmckernelapi
target_link_libraries
(
${
execname
}
${
scalfmm_lib
}
scalfmmckernelapi
# ${BLAS_LIBRARIES}
# ${LAPACK_LIBRARIES}
${
SCALFMM_LIBRARIES
}
)
endif
()
endforeach
(
exec
)
endif
()
CMakeLists.txt
View file @
78807cc5
...
...
@@ -439,6 +439,8 @@ add_subdirectory(Doc)
#
if
(
ScalFMM_USE_ADDONS
)
file
(
GLOB all_addons ./Addons/*
)
# Options
OPTION
(
ScalFMM_ADDON_CKERNELAPI
"Set to ON to build ScaFMM FMM API interface"
OFF
)
foreach
(
addon_name
${
all_addons
}
)
MESSAGE
(
STATUS
"Addons +=
${
addon_name
}
"
)
...
...
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