-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Build fixes (update FindFFTW) * Add `CurrentTurns` field to KGElectromagnet * Fix segfault in KGComplexAnnulus
- Loading branch information
Showing
8 changed files
with
119 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,60 @@ | ||
# FFTW_INCLUDE_DIR = fftw3.h | ||
# FFTW_LIBRARIES = libfftw3.a | ||
# FFTW_FOUND = true if FFTW3 is found | ||
|
||
IF(FFTW_INCLUDE_DIRS) | ||
FIND_PATH(FFTW_INCLUDE_DIR fftw3.h ${FFTW_INCLUDE_DIRS}) | ||
FIND_LIBRARY(FFTW_LIBRARY fftw3 ${FFTW_LIBRARY_DIRS}) | ||
ELSE(FFTW_INCLUDE_DIRS) | ||
# SET(TRIAL_PATHS | ||
# $ENV{FFTW_HOME}/include | ||
# /usr/include | ||
# /usr/local/include | ||
# /opt/include | ||
# /usr/apps/include | ||
# ) | ||
# | ||
# SET(TRIAL_LIBRARY_PATHS | ||
# $ENV{FFTW_HOME}/lib | ||
# /usr/lib | ||
# /usr/local/lib | ||
# /opt/lib | ||
# /sw/lib | ||
# ) | ||
# | ||
# FIND_PATH(FFTW_INCLUDE_DIR fftw3.h ${TRIAL_PATHS}) | ||
# FIND_LIBRARY(FFTW_LIBRARY fftw3 ${TRIAL_LIBRARY_PATHS}) | ||
FIND_PATH(FFTW_INCLUDE_DIR fftw3.h ${QMC_INCLUDE_PATHS}) | ||
FIND_LIBRARY(FFTW_LIBRARIES fftw3 ${QMC_LIBRARY_PATHS}) | ||
|
||
ENDIF(FFTW_INCLUDE_DIRS) | ||
|
||
SET(FFTW_FOUND FALSE) | ||
IF(FFTW_INCLUDE_DIR AND FFTW_LIBRARIES) | ||
MESSAGE(STATUS "FFTW_INCLUDE_DIR=${FFTW_INCLUDE_DIR}") | ||
MESSAGE(STATUS "FFTW_LIBRARIES=${FFTW_LIBRARIES}") | ||
SET(FFTW_FOUND TRUE) | ||
ENDIF() | ||
|
||
MARK_AS_ADVANCED( | ||
FFTW_INCLUDE_DIR | ||
FFTW_LIBRARIES | ||
FFTW_FOUND | ||
|
||
# ================================================================================================== | ||
# | ||
# Defines the following variables: | ||
# FFTW_FOUND Boolean holding whether or not the FFTW3 library was found | ||
# FFTW_INCLUDE_DIRS The FFTW3 include directory | ||
# FFTW_LIBRARIES The FFTW3 library | ||
# | ||
# In case FFTW3 is not installed in the default directory, set the FFTW_ROOT variable to point to | ||
# the root of FFTW3, such that 'fftw3.h' can be found in $FFTW_ROOT/include. This can either be done | ||
# using an environmental variable (e.g. export FFTW_ROOT=/path/to/fftw3) or using a CMake variable | ||
# (e.g. cmake -DFFTW_ROOT=/path/to/fftw3 ..). | ||
# | ||
# ================================================================================================== | ||
|
||
# Sets the possible install locations | ||
set(FFTW_HINTS | ||
${FFTW_ROOT} | ||
$ENV{FFTW_ROOT} | ||
) | ||
set(FFTW_PATHS | ||
/usr | ||
/usr/local | ||
) | ||
|
||
# Finds the include directories | ||
find_path(FFTW_INCLUDE_DIRS | ||
NAMES fftw3.h | ||
HINTS ${FFTW_HINTS} | ||
PATH_SUFFIXES include api inc include/x86_64 include/x64 | ||
PATHS ${FFTW_PATHS} | ||
DOC "FFTW3 include header fftw3.h" | ||
) | ||
mark_as_advanced(FFTW_INCLUDE_DIRS) | ||
|
||
# Finds the library | ||
find_library(FFTW_LIBRARIES | ||
NAMES fftw3 | ||
HINTS ${FFTW_HINTS} | ||
PATH_SUFFIXES lib lib64 lib/x86_64 lib/x64 lib/x86 lib/Win32 | ||
PATHS ${FFTW_PATHS} | ||
DOC "FFTW3 library" | ||
) | ||
mark_as_advanced(FFTW_LIBRARIES) | ||
|
||
# ================================================================================================== | ||
|
||
# Notification messages | ||
if(NOT FFTW_INCLUDE_DIRS) | ||
message(STATUS "Could NOT find 'fftw3.h', install FFTW3 or set FFTW_ROOT") | ||
endif() | ||
if(NOT FFTW_LIBRARIES) | ||
message(STATUS "Could NOT find the FFTW3 library, install it or set FFTW_ROOT") | ||
endif() | ||
|
||
# Determines whether or not FFTW3 was found | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_INCLUDE_DIRS FFTW_LIBRARIES) | ||
|
||
# ================================================================================================== |