Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
particle_methods
hysop
Commits
78ce54c7
Commit
78ce54c7
authored
7 years ago
by
Christophe Picard
Browse files
Options
Downloads
Patches
Plain Diff
Add automatic detection of dynamic extension
parent
89dd05a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/FindFFTW.cmake
+18
-11
18 additions, 11 deletions
cmake/FindFFTW.cmake
with
18 additions
and
11 deletions
cmake/FindFFTW.cmake
+
18
−
11
View file @
78ce54c7
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
# set(FIND_FFTW_DEBUG OFF) (optional)
# set(FIND_FFTW_DEBUG OFF) (optional)
# set(FIND_FFTW_SHARED_ONLY ON) (optional)
# set(FIND_FFTW_SHARED_ONLY ON) (optional)
# find_package(FFTW
# find_package(FFTW
# REQUIRED COMPONENTS
F
ftw3f
F
ftw3d
# REQUIRED COMPONENTS
f
ftw3f
f
ftw3d
# OPTIONAL_COMPONENTS
F
ftw3l
F
ftw3q
# OPTIONAL_COMPONENTS
f
ftw3l
f
ftw3q
# OPTIONAL_COMPONENTS
F
ftw3f-mpi
F
ftw3d-mpi
F
ftw3l-mpi
# OPTIONAL_COMPONENTS
f
ftw3f-mpi
f
ftw3d-mpi
f
ftw3l-mpi
# OPTIONAL_COMPONENTS
Ft
tw3f-omp
F
ftw3d-omp
F
ftw3l-omp
F
ftw3q-omp
# OPTIONAL_COMPONENTS
ff
tw3f-omp
f
ftw3d-omp
f
ftw3l-omp
f
ftw3q-omp
# OPTIONAL_COMPONENTS
Ft
tw3f-threads
F
ftw3d-threads
F
ftw3l-threads
F
ftw3q-threads)
# OPTIONAL_COMPONENTS
ff
tw3f-threads
f
ftw3d-threads
f
ftw3l-threads
f
ftw3q-threads)
#
#
# == Defined variables ==
# == Defined variables ==
#
#
...
@@ -84,6 +84,17 @@ list(APPEND FFTW_LIBRARIES "")
...
@@ -84,6 +84,17 @@ list(APPEND FFTW_LIBRARIES "")
list
(
APPEND FFTW_DEFINES
""
)
list
(
APPEND FFTW_DEFINES
""
)
list
(
APPEND FFTW_COMPILE_FLAGS
""
)
list
(
APPEND FFTW_COMPILE_FLAGS
""
)
# -- rename library to match shared or static constraints
#Check whether to search static or dynamic libs
set
(
CMAKE_FIND_LIBRARY_SUFFIXES_SAV
${
CMAKE_FIND_LIBRARY_SUFFIXES
}
)
if
(
${
FFTW_USE_STATIC_LIBS
}
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
else
()
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
endif
()
foreach
(
fftw_comp
${
FFTW_FIND_COMPONENTS
}
)
foreach
(
fftw_comp
${
FFTW_FIND_COMPONENTS
}
)
string
(
REPLACE
"-"
"_"
fftw_comp_no_dash
"
${
fftw_comp
}
"
)
string
(
REPLACE
"-"
"_"
fftw_comp_no_dash
"
${
fftw_comp
}
"
)
string
(
TOLOWER
${
fftw_comp_no_dash
}
component
)
string
(
TOLOWER
${
fftw_comp_no_dash
}
component
)
...
@@ -103,12 +114,7 @@ foreach(fftw_comp ${FFTW_FIND_COMPONENTS})
...
@@ -103,12 +114,7 @@ foreach(fftw_comp ${FFTW_FIND_COMPONENTS})
# -- find library name given the component name
# -- find library name given the component name
string
(
REPLACE
"fftw3d"
"fftw3"
library
"
${
component
}
"
)
string
(
REPLACE
"fftw3d"
"fftw3"
library
"
${
component
}
"
)
# -- rename library to match shared or static constraints
set
(
library
"lib
${
library
}${
CMAKE_FIND_LIBRARY_SUFFIXES
}
"
)
if
(
FIND_FFTW_SHARED_ONLY
)
set
(
library
"lib
${
library
}
.so"
)
elseif
(
FIND_FFTW_STATIC_ONLY
)
set
(
library
"lib
${
library
}
.a"
)
endif
()
if
(
FIND_FFTW_DEBUG
)
if
(
FIND_FFTW_DEBUG
)
message
(
"
\t
FFTW::
${
fftw_comp
}
:
${
COMPONENT
}
:
${
component
}
, LIB=
${
library
}
HEADER=
${
header
}
"
)
message
(
"
\t
FFTW::
${
fftw_comp
}
:
${
COMPONENT
}
:
${
component
}
, LIB=
${
library
}
HEADER=
${
header
}
"
)
...
@@ -257,6 +263,7 @@ list(REMOVE_DUPLICATES FFTW_LIBRARY_DIRS)
...
@@ -257,6 +263,7 @@ list(REMOVE_DUPLICATES FFTW_LIBRARY_DIRS)
list
(
REMOVE_DUPLICATES FFTW_LIBRARIES
)
list
(
REMOVE_DUPLICATES FFTW_LIBRARIES
)
list
(
REMOVE_DUPLICATES FFTW_DEFINES
)
list
(
REMOVE_DUPLICATES FFTW_DEFINES
)
list
(
REMOVE_DUPLICATES FFTW_COMPILE_FLAGS
)
list
(
REMOVE_DUPLICATES FFTW_COMPILE_FLAGS
)
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
CMAKE_FIND_LIBRARY_SUFFIXES_SAV
}
)
# -- check required variables, version and set FFTW_FOUND to TRUE if ok
# -- check required variables, version and set FFTW_FOUND to TRUE if ok
find_package_handle_standard_args
(
FFTW FOUND_VAR FFTW_FOUND
find_package_handle_standard_args
(
FFTW FOUND_VAR FFTW_FOUND
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment