Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • OPAL/opal-x/src
  • germann_e/src
  • binder_j/opalx-elements
3 results
Show changes
Commits on Source (4156)
Showing
with 676 additions and 4138 deletions
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
BreakBeforeBinaryOperators: NonAssignment
ColumnLimit: 100
DerivePointerAlignment: false
IndentWidth: 4
IncludeBlocks: Preserve
IndentGotoLabels: false
NamespaceIndentation: All
...
(
(nil . (
(indent-tabs-mode . nil)
(require-final-newline . nil)
)
)
(cmake-mode . (
(cmake-tab-width . 4)
)
)
(c-mode . (
(c-basic-offset . 4)
)
)
(c++-mode . (
(c-basic-offset . 4)
)
)
)
This diff is collapsed.
.DS_Store .DS_Store
.ipynb_checkpoints
#*
*~ *~
*.o *.o
*.a *.a
*.aux
*.h5
#*#
*.dat
optimizer/Tests/*.exe
build build
data
CMakeCache.txt CMakeCache.txt
CMakeFiles CMakeFiles
cmake_install.cmake cmake_install.cmake
OPALconfig.h config.h
src/OPALconfig.h
Makefile Makefile
OPALrevision.h revision.h
src/OPALrevision.h
src/opal src/opal
tests/tools/gtest tests/tools/gtest
tests/opal_unit_test tests/opal_unit_tests
tests/OpalSourcePath.h
doc/user_guide/opal_user_guide.bcf
doc/user_guide/opal_user_guide.idx
doc/user_guide/opal_user_guide.lof
doc/user_guide/opal_user_guide.log
doc/user_guide/opal_user_guide.lot
doc/user_guide/opal_user_guide.out
doc/user_guide/opal_user_guide.pdf
doc/user_guide/opal_user_guide.run.xml
doc/user_guide/opal_user_guide.synctex.gz
doc/user_guide/opal_user_guide.toc
.rtags
init-test.sh
init.el
input-files/OPAL-X-STAT0.csv
input-files/timing.dat
build_*
\ No newline at end of file
### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
(How one can reproduce the issue - this is very important)
### What is the current *bug* behavior?
(What actually happens)
### What is the expected *correct* behavior?
(What you should see instead)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~Bug
### Summary
(Summarize the feature request concisely)
/label ~"Feature request"
\ No newline at end of file
### What does this MR do?
### Does this MR meet the acceptance criteria?
* [ ] [Coding style guidelines](https://gitlab.psi.ch/OPAL/src/wikis/For-Developers/CodingStyle)
* [ ] [Change to Release Notes](https://gitlab.psi.ch/OPAL/src/wikis/ReleaseNotes/ReleaseNotes)
/label ~Bug
### What does this MR do?
### Does this MR meet the acceptance criteria?
* [ ] [Coding style guidelines](https://gitlab.psi.ch/OPAL/src/wikis/For-Developers/CodingStyle)
* [ ] [Change to Release Notes](https://gitlab.psi.ch/OPAL/src/wikis/ReleaseNotes/ReleaseNotes)
* [ ] Documentation added
/label ~"Feature request"
set et ts=4 sw=4 sts=4
\ No newline at end of file
Expressions.h
// Template class Expression::PtrToScalar<T>.
// ----------------------------------------------------------------------
/// A pointer to a scalar expression.
template <class T> using PtrToScalar = std::shared_ptr<Scalar<T>>;
template <class T> using PtrToScalar = std::unique_ptr<Scalar<T>>;
Noe: giving up tp replace the Classic/MemoryManagement/OwnPrt.h
Add new element XXX:
AbsBeamline/ElementBase.h,cpp
Algorithms/DefaultVisitor.h,cpp
Algorithms/ParallelTracker.h
OpalConfigure/Configure.cpp
Algorithms/ParallelTracker.h
AbsBeamline/BeamlineVisitor.h
AbsBeamline/XXX.cpp
AbsBeamline/XXX.h
AbsBeamline/CMakeLists.txt
BeamlineCore/XXXRep.cpp
BeamlineCore/XXXRep.h
BeamlineCore/CMakeLists.txt
Elements/OpalXXX.cpp
Elements/OpalXXX.h
Elements/CMakeLists.txt
This diff is collapsed.
# -*- mode: cmake -*-
#
# Set up defines necessary to build BoxLib-based code
if(__CCSE_OPTIONS_INCLUDED)
return()
endif()
set(__CCSE_OPTIONS_INCLUDED 1)
include(FortranCInterface)
include(${FortranCInterface_BINARY_DIR}/Output.cmake)
#message(STATUS "BoxLib-specific compile settings:")
if(FortranCInterface_GLOBAL_SUFFIX STREQUAL "" AND FortranCInterface_GLOBAL_CASE STREQUAL "UPPER")
# message(STATUS " Fortran name mangling scheme to UPPERCASE (upper case, no append underscore)")
set(BL_FORTLINK UPPERCASE)
elseif(FortranCInterface_GLOBAL_SUFFIX STREQUAL "" AND FortranCInterface_GLOBAL_CASE STREQUAL "LOWER")
# message(STATUS " Fortran name mangling scheme to LOWERCASE (lower case, no append underscore)")
set(BL_FORTLINK LOWERCASE)
elseif(FortranCInterface_GLOBAL_SUFFIX STREQUAL "_" AND FortranCInterface_GLOBAL_CASE STREQUAL "LOWER")
# message(STATUS " Fortran name mangling scheme to UNDERSCORE (lower case, append underscore)")
set(BL_FORTLINK "UNDERSCORE")
#else()
# message(AUTHOR_WARNING "Fortran to C mangling not backward compatible with older style BoxLib code")
endif()
set(BL_MACHINE ${CMAKE_SYSTEM_NAME})
set(BL_DEFINES "BL_NOLINEVALUES;BL_PARALLEL_IO;BL_SPACEDIM=3;BL_FORT_USE_${BL_FORTLINK};BL_${BL_MACHINE};BL_USE_DOUBLE;MG_USE_FBOXLIB;MG_USE_F90_SOLVERS;MG_USE_FBOXLIB")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
list(APPEND BL_DEFINES NDEBUG)
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
list(APPEND BL_DEFINES NDEBUG)
elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
list(APPEND BL_DEFINES NDEBUG)
endif()
set(ENABLE_MPI TRUE)
if (ENABLE_MPI)
# bandre: I think the amanzi config requires that the mpi compilers
# be set through the CC/CXX/FC environment variables before cmake is
# called. This is overwriting those values and causing the incorrect
# values to be used?
#find_package(MPI REQUIRED)
list(APPEND BL_DEFINES BL_USE_MPI)
set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} ${MPI_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_FLAGS}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MPI_Fortran_FLAGS}")
set(CCSE_LIBDIR_MPI_SUFFIX .MPI)
else()
set(CCSE_LIBDIR_MPI_SUFFIX)
endif()
set (ENABLE_OpenMP FALSE)
if (ENABLE_OpenMP)
set(CCSE_LIBDIR_OMP_SUFFIX .OMP)
else()
set(CCSE_LIBDIR_OMP_SUFFIX)
endif(ENABLE_OpenMP)
get_directory_property(defs COMPILE_DEFINITIONS)
if(defs)
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS $defs ${BL_DEFINES})
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ftemplate-depth=512 -Wno-deprecated")
endif(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND BL_DEFINES "OPAL")
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${BL_DEFINES}")
# -*- mode: cmake -*-
#
# OPAL CCSE Find Module
#
# Usage:
# Control the search through CCSE_DIR or setting environment variable
# CCSE_ROOT to the ccse installation prefix.
#
# This module does not search default paths!
#
# Following variables are set:
# CCSE_FOUND (BOOL) Flag indicating if CCSE was found
# CCSE_INCLUDE_DIR (PATH) Path to the CCSE include file
# CCSE_INCLUDE_DIRS (LIST) List of all required include files
# CCSE_LIBRARY_DIR (PATH) Path to the CCSE library
# CCSE_LIBRARIES (LIST) List of all required CCSE libraries
# CCSE_PERL_DIR (PATH) Path to CCSE Perl scripts
# CCSE_EXT_LIBRARIES (LIST)
# CCSE_EXT_LIBRARY_DIRS (LIST)
#
# #############################################################################
# Standard CMake modules see CMAKE_ROOT/Modules
include(FindPackageHandleStandardArgs)
# OPAL CMake functions see <root>/tools/cmake for source
include(CCSEOptions)
MESSAGE (STATUS "IN FIND CCSE_LIBRARIES")
if ( CCSE_LIBRARIES AND CCSE_INCLUDE_DIRS AND CCSE_PERL_DIR)
# Do nothing. Variables are set. No need to search again
else(CCSE_LIBRARIES AND CCSE_INCLUDE_DIRS AND CCSE_PERL_DIR)
# Cache variables
if(CCSE_DIR)
set(CCSE_DIR "${CCSE_DIR}" CACHE PATH "Path to search for CCSE include and library files")
endif()
if(CCSE_INCLUDE_DIR)
set(CCSE_INCLUDE_DIR "${CCSE_INCLUDE_DIR}" CACHE PATH "Path to search for CCSE include files")
endif()
if(CCSE_LIBRARY_DIR)
set(CCSE_LIBRARY_DIR "${CCSE_LIBRARY_DIR}" CACHE PATH "Path to search for CCSE library files")
endif()
if(CCSE_PERL_DIR)
set(CCSE_PERL_DIR "${CCSE_PERL_DIR}" CACHE PATH "Path to search for CCSE perl scripts")
endif()
# Search for include files
# Search order preference:
# (1) CCSE_INCLUDE_DIR - check existence of path AND if the include files exist
# (2) CCSE_DIR/include
# (3) Default CMake paths See cmake --html-help=out.html file for more information.
#
set(ccse_inc_names "BoxLib.H")
if (CCSE_INCLUDE_DIR)
if (EXISTS "${CCSE_INCLUDE_DIR}")
find_path(ccse_test_include_path
NAMES ${ccse_inc_names}
HINTS ${CCSE_INCLUDE_DIR}
NO_DEFAULT_PATH)
if(NOT ccse_test_include_path)
message(SEND_ERROR "Cannot locate ${ccse_inc_names} in ${CCSE_INCLUDE_DIR}")
endif()
set(CCSE_INCLUDE_DIR ${ccse_test_include_path} )
else()
message(SEND_ERROR "CCSE_INCLUDE_DIR=${CCSE_INCLUDE_DIR} does not exist")
set(CCSE_INCLUDE_DIR "CCSE_INCLUDE_DIR-NOTFOUND")
endif()
else()
set(ccse_inc_suffixes "include")
if(CCSE_DIR)
if (EXISTS "${CCSE_DIR}" )
find_path(CCSE_INCLUDE_DIR
NAMES ${ccse_inc_names}
HINTS ${CCSE_DIR}
PATH_SUFFIXES ${ccse_inc_suffixes}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "CCSE_DIR=${CCSE_DIR} does not exist")
set(CCSE_INCLUDE_DIR "CCSE_INCLUDE_DIR-NOTFOUND")
endif()
else()
find_path(CCSE_INCLUDE_DIR
NAMES ${ccse_inc_names}
PATH_SUFFIXES ${ccse_inc_suffixes})
endif()
endif()
if ( NOT CCSE_INCLUDE_DIR )
message(SEND_ERROR "Cannot locate CCSE include directory")
else()
set(CCSE_INCLUDE_DIRS ${CCSE_INCLUDE_DIR})
endif()
# Search for libraries
# Search order preference:
# (1) CCSE_LIBRARY_DIR - check existence of path AND if the include files exist
# (2) CCSE_DIR/<lib,Lib>
# (3) Default CMake paths See cmake --html-help=out.html file for more information.
#
set(ccse_lib_name box_c)
if (CCSE_LIBRARY_DIR)
if (EXISTS "${CCSE_LIBRARY_DIR}")
find_library(CCSE_LIBRARY
NAMES ${ccse_lib_name}
HINTS ${CCSE_LIBRARY_DIR}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "CCSE_LIBRARY_DIR=${CCSE_LIBRARY_DIR} does not exist")
set(CCSE_LIBRARY "CCSE_LIBRARY-NOTFOUND")
endif()
else()
if(CCSE_DIR)
if (EXISTS "${CCSE_DIR}" )
find_library(CCSE_LIBRARY
NAMES ${ccse_lib_name}
HINTS ${CCSE_DIR}
PATH_SUFFIXES "lib"
NO_DEFAULT_PATH)
get_filename_component(CCSE_LIBRARY_DIR "${CCSE_LIBRARY}" PATH)
else()
message(SEND_ERROR "CCSE libs not found in CCSE_DIR/lib${CCSE_LIBDIR_MPI_SUFFIX}${CCSE_LIBDIR_OMP_SUFFIX}, (CCSE_DIR=${CCSE_DIR})")
set(CCSE_LIBRARY "CCSE_LIBRARY-NOTFOUND")
endif()
else()
find_library(CCSE_LIBRARY
NAMES ${ccse_lib_name})
get_filename_component(CCSE_LIBRARY_DIR "${CCSE_LIBRARY}" PATH)
endif()
endif()
# Now, make sure the rest are in the same place
set(CCSE_LIBRARIES box_camrdata;cboxlib;cfboxlib;fboxlib;gslib)
foreach (L ${CCSE_LIBRARIES})
find_library(CCSE_LIBRARY
NAMES ${L}
HINTS ${CCSE_LIBRARY_DIR}
NO_DEFAULT_PATH)
if ( NOT CCSE_LIBRARY )
message(SEND_ERROR "Cannot locate CCSE library: ${L}")
endif()
endforeach()
set(CCSE_LIBRARY_DIRS ${CCSE_LIBRARY_DIR})
# Search for perl scripts
# Search order preference:
# (1) CCSE_PERL_DIR - check existence of path AND if the perl script exist
# (2) CCSE_DIR/perl
# (3) Default CMake paths See cmake --html-help=out.html file for more information.
#
set(ccse_perl_name strip72)
if (CCSE_PERL_DIR)
if (EXISTS "${CCSE_PERL_DIR}")
find_path(CCSE_PERL
NAMES ${ccse_perl_name}
HINTS ${CCSE_PERL_DIR}
NO_DEFAULT_PATH)
else()
message(SEND_ERROR "CCSE_PERL_DIR=${CCSE_PERL_DIR} does not exist")
set(CCSE_PERL "CCSE_PERL-NOTFOUND")
endif()
else()
if(CCSE_DIR)
if (EXISTS "${CCSE_DIR}" )
find_path(CCSE_PERL
NAMES ${ccse_perl_name}
HINTS "${CCSE_DIR}/perl"
NO_DEFAULT_PATH)
if ( NOT CCSE_PERL )
message(SEND_ERROR "CCSE Perl scripts not in CCSE_DIR/perl=${CCSE_DIR}/perl")
else()
set(CCSE_PERL_DIR ${CCSE_PERL})
endif()
else()
message(SEND_ERROR "CCSE_DIR/perl=${CCSE_DIR}/perl does not exist")
endif()
endif()
endif()
set(CCSE_EXT_LIBRARIES "")
endif(CCSE_LIBRARIES AND CCSE_INCLUDE_DIRS AND CCSE_PERL_DIR)
# Send useful message if everything is found
find_package_handle_standard_args(CCSE DEFAULT_MSG
CCSE_LIBRARIES
CCSE_LIBRARY_DIRS
CCSE_INCLUDE_DIRS
CCSE_PERL_DIR)
mark_as_advanced(
CCSE_INCLUDE_DIR
CCSE_INCLUDE_DIRS
CCSE_LIBRARIES
CCSE_LIBRARY_DIR
CCSE_LIBRARY_DIRS
CCSE_PERL_DIR
)
# #
# Find GSL includes and library # Find GSL includes and libraries
# #
# GSL # The FindGSL module shipped with CMake has some drawbacks. To be
# It can be found at: # able to find GSL, the CMake variable GSL_ROOT_DIR *must* be set.
# http://amas.web.psi.ch/tools/GSL/index.html # The environment variable C_INCLUDE_PATH and LIBRARY_PATH are
# *not* taken into account.
#
# The following variables will be set if GSL is found:
#
# GSL_INCLUDE_DIR where to find GSL include files
# GSL_LIBRARY GSL library to link against.
# GSL_CBLAS_LIBRARY GSL CBlas library to link against
# GSL_LIBRARIES GSL libraries required for linking
# GSL_FOUND set to True if GSL was found
# #
# GSL_INCLUDE_DIR - where to find ippl.h
# GSL_LIBRARY - qualified libraries to link against.
# GSL_FOUND - do not attempt to use if "no" or undefined.
FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_fft.h
HINTS $ENV{GSL_INCLUDE_PATH} $ENV{GSL_INCLUDE_DIR} $ENV{GSL_PREFIX}/include $ENV{GSL_DIR}/include $ENV{GSL}/include
PATHS ENV CPP_INCLUDE_PATH
)
if( DEFINED ENV{GSL_ROOT_DIR} )
set( GSL_ROOT_DIR $ENV{GSL_ROOT_DIR} )
elseif( DEFINED ENV{GSL_DIR} )
set( GSL_ROOT_DIR $ENV{GSL_DIR} )
elseif( DEFINED ENV{GSL_HOME} )
set( GSL_ROOT_DIR $ENV{GSL_HOME} )
elseif( DEFINED ENV{GSL_PREFIX} )
set( GSL_ROOT_DIR $ENV{GSL_PREFIX} )
elseif( DEFINED ENV{GSL} )
set( GSL_ROOT_DIR $ENV{GSL} )
else()
set( GSL_ROOT_DIR "/usr" )
endif()
FIND_LIBRARY(GSL_LIBRARY gsl find_path( GSL_INCLUDE_DIR gsl/gsl_fft.h
HINTS $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR} $ENV{GSL_PREFIX}/lib $ENV{GSL_DIR}/lib $ENV{GSL}/lib HINTS ${GSL_ROOT_DIR}/include $ENV{GSL_INCLUDE_PATH} $ENV{GSL_INCLUDE_DIR}
PATHS ENV LIBRARY_PATH PATHS ENV C_INCLUDE_PATH
) )
FIND_LIBRARY(GSL_LIBRARY_CBLAS gslcblas find_library( GSL_LIBRARY gsl
HINTS $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR} $ENV{GSL_PREFIX}/lib $ENV{GSL_DIR}/lib $ENV{GSL}/lib HINTS ${GSL_ROOT_DIR}/lib $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR}
PATHS ENV LIBRARY_PATH PATHS ENV LIBRARY_PATH
) )
set( GSL_LIBRARY find_library (GSL_CBLAS_LIBRARY gslcblas
${GSL_LIBRARY} HINTS ${GSL_ROOT_DIR}/lib $ENV{GSL_LIBRARY_PATH} $ENV{GSL_LIBRARY_DIR}
${GSL_LIBRARY_CBLAS} PATHS ENV LIBRARY_PATH
) )
IF(GSL_INCLUDE_DIR AND GSL_LIBRARY) if( GSL_INCLUDE_DIR AND GSL_LIBRARY AND GSL_CBLAS_LIBRARY)
SET( GSL_FOUND "YES" ) set( GSL_FOUND "YES" )
ENDIF(GSL_INCLUDE_DIR AND GSL_LIBRARY) set( GSL_LIBRARIES ${GSL_LIBRARY},${GSL_CBLAS_LIBRARY} )
endif()
IF (GSL_FOUND) if( GSL_FOUND )
IF (NOT GSL_FIND_QUIETLY) if( NOT GSL_FIND_QUIETLY )
MESSAGE(STATUS "Found GSL libraries: ${GSL_LIBRARY}") message( STATUS "Found GSL libraries: ${GSL_LIBRARY}")
MESSAGE(STATUS "Found GSL include dir: ${GSL_INCLUDE_DIR}") message( STATUS "Found GSL include dir: ${GSL_INCLUDE_DIR}")
ENDIF (NOT GSL_FIND_QUIETLY) endif()
ELSE (GSL_FOUND) else()
IF (GSL_FIND_REQUIRED) if( GSL_FIND_REQUIRED )
MESSAGE(FATAL_ERROR "Could not find GSL!") message( FATAL_ERROR "Could not find GSL!" )
ENDIF (GSL_FIND_REQUIRED) endif()
ENDIF (GSL_FOUND) endif()
# #
# Find gtest Google Test includes and library # Find gtest Google Test includes and library
# #
# gtest
# It can be found at:
# http://amas.web.psi.ch/tools/GSL/index.html
#
# GTEST_INCLUDE_DIR - where to find gtest/gtest.h # GTEST_INCLUDE_DIR - where to find gtest/gtest.h
# GTEST_LIBRARY - libgtest.a path # GTEST_LIBRARY - libgtest.a path
# GTEST_MAIN_LIBRARY - libgtest_main.a path # GTEST_MAIN_LIBRARY - libgtest_main.a path
...@@ -30,9 +26,21 @@ set( GTEST_BOTH_LIBRARIES ...@@ -30,9 +26,21 @@ set( GTEST_BOTH_LIBRARIES
${GTEST_LIBRARY_MAIN} ${GTEST_LIBRARY_MAIN}
) )
IF(GTEST_INCLUDE_DIR AND GTEST_LIBRARY) set (GTEST_INCLUDE_DIRS
${GTEST_INCLUDE_DIR}
)
set (GTEST_MAIN_LIBRARIES
${GTEST_LIBRARY_MAIN}
)
set (GTEST_LIBRARIES
${GTEST_LIBRARY}
)
IF(GTEST_INCLUDE_DIR AND GTEST_LIBRARY AND GTEST_LIBRARY_MAIN)
SET( GTEST_FOUND "YES" ) SET( GTEST_FOUND "YES" )
ENDIF(GTEST_INCLUDE_DIR AND GTEST_LIBRARY) ENDIF()
IF (GTEST_FOUND) IF (GTEST_FOUND)
IF (NOT GTEST_FIND_QUIETLY) IF (NOT GTEST_FIND_QUIETLY)
...@@ -43,6 +51,4 @@ ELSE (GTEST_FOUND) ...@@ -43,6 +51,4 @@ ELSE (GTEST_FOUND)
IF (GTest_FIND_REQUIRED) IF (GTest_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GTEST!") MESSAGE(FATAL_ERROR "Could not find GTEST!")
ENDIF (GTest_FIND_REQUIRED) ENDIF (GTest_FIND_REQUIRED)
ENDIF (GTEST_FOUND) ENDIF (GTEST_FOUND)
\ No newline at end of file
...@@ -35,17 +35,11 @@ ELSE (H5Hut_FOUND) ...@@ -35,17 +35,11 @@ ELSE (H5Hut_FOUND)
ENDIF (H5Hut_FOUND) ENDIF (H5Hut_FOUND)
include (CheckIncludeFile) include (CheckIncludeFile)
CHECK_INCLUDE_FILE (H5_file_attribs.h HAVE_API2_FUNCTIONS "-DPARALLEL_IO") SET (CMAKE_REQUIRED_INCLUDES ${H5Hut_INCLUDE_DIR})
CHECK_INCLUDE_FILE (H5_file_attribs.h HAVE_API2_FUNCTIONS "-I${H5Hut_INCLUDE_DIR} -DPARALLEL_IO")
IF (HAVE_API2_FUNCTIONS) IF (HAVE_API2_FUNCTIONS)
MESSAGE (STATUS "H5hut version is >= 2") MESSAGE (STATUS "H5hut version is OK")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_H5HUT2")
ELSE (HAVE_API2_FUNCTIONS) ELSE (HAVE_API2_FUNCTIONS)
MESSAGE (STATUS "H5hut version is 1.x") MESSAGE (ERROR "H5hut >= 2 required")
ENDIF (HAVE_API2_FUNCTIONS) ENDIF (HAVE_API2_FUNCTIONS)
# Local Variables:
# mode:cmake
# cmake-tab-width: 4
# indent-tabs-mode:nil
# End:
\ No newline at end of file
#
# Find HDF5 includes and library
#
# HDF5
# It can be found at:
# http://amas.web.psi.ch/tools/HDF5/index.html
#
# HDF5_INCLUDE_DIR - where to find hdf5.h
# HDF5_LIBRARY - qualified libraries to link against.
# HDF5_FOUND - do not attempt to use if "no" or undefined.
SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
FIND_PATH(HDF5_INCLUDE_DIR hdf5.h
HINTS $ENV{HDF5_INCLUDE_PATH} $ENV{HDF5_INCLUDE_DIR} $ENV{HDF5_PREFIX}/include $ENV{HDF5_DIR}/include $ENV{HDF5}/include
PATHS ENV C_INCLUDE_PATH
)
FIND_LIBRARY(HDF5_LIBRARY libhdf5.a
HINTS $ENV{HDF5_LIBRARY_PATH} $ENV{HDF5_LIBRARY_DIR} $ENV{HDF5_PREFIX}/lib $ENV{HDF5_DIR}/lib $ENV{HDF5}/lib
PATHS ENV LIBRARY_PATH
)
IF(HDF5_INCLUDE_DIR AND HDF5_LIBRARY)
SET( HDF5_FOUND "YES" )
ENDIF(HDF5_INCLUDE_DIR AND HDF5_LIBRARY)
IF (HDF5_FOUND)
IF (NOT HDF5_FIND_QUIETLY)
MESSAGE(STATUS "Found HDF5 library: ${HDF5_LIBRARY}")
MESSAGE(STATUS "Found HDF5 include dir: ${HDF5_INCLUDE_DIR}")
ENDIF (NOT HDF5_FIND_QUIETLY)
ELSE (HDF5_FOUND)
IF (HDF5_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find HDF5!")
ENDIF (HDF5_FIND_REQUIRED)
ENDIF (HDF5_FOUND)
#
# Find IPPL package
# https://
#
# IPPL_INCLUDE_DIR
# IPPL_LIBRARY_DIR
# IPPL_FOUND
#message (STATUS "Hint IPPL include dir: ${IPPL_DIR}")
find_path (IPPL_INCLUDE_DIR Ippl.h
HINTS ${IPPL_DIR}/include
PATHS ENV C_INCLUDE_PATH
)
#message (STATUS "From find_path IPPL_INCLUDE_DIR: ${IPPL_INCLUDE_DIR}")
find_path (IPPL_LIBRARY_DIR libippl.a
HINTS ${IPPL_DIR}/lib
PATHS ENV LIBRARY_PATH
)
#message (STATUS "From find_path IPPL_LIBRARY_DIR: ${IPPL_LIBRARY_DIR}")
if (IPPL_INCLUDE_DIR AND IPPL_LIBRARY_DIR)
set (IPPL_FOUND "YES")
endif ()
if (IPPL_FOUND)
if (NOT IPPL_FIND_QUIETLY)
message (STATUS "Found IPPL include dir: ${IPPL_INCLUDE_DIR}")
message (STATUS "Found IPPL library dir: ${IPPL_LIBRARY_DIR}")
set (IPPL_LIBRARIES libippl.a)
endif ()
else (IPPL_FOUND)
if (IPPL_FIND_REQUIRED)
if (NOT IPPL_INCLUDE_DIR)
message (WARNING
"IPPL include directory was not found! "
"Make sure that IPPL is compiled and that "
"the directory ippl/include/ippl has been automatically created. "
"Also make sure that at least one of the following "
"environment variables is set: "
"IPPL_INCLUDE_DIR, IPPL_INCLUDE_PATH, IPPL_PREFIX, or IPPL.")
endif ()
if (NOT IPPL_LIBRARY_DIR)
message (WARNING
"IPPL library was not found! "
"Make sure that IPPL is compiled and that "
"the directory ippl/lib has been automatically created. "
"Also make sure that at least one of the following "
"environment variables is set: "
"IPPL_LIBRARY_DIR, IPPL_LIBRARY_PATH, IPPL_PREFIX, or IPPL.")
endif ()
message (STATUS "IPPL can be downloaded and compiled from https://xxxx")
message (FATAL_ERROR "Could not find IPPL!")
endif (IPPL_FIND_REQUIRED)
endif (IPPL_FOUND)
include (CheckIncludeFile)
SET (CMAKE_REQUIRED_INCLUDES ${IPPL_INCLUDE_DIR})
CHECK_INCLUDE_FILE (Ippl.h HAVE_API2_FUNCTIONS "-I${IPPL_INCLUDE_DIR} -DPARALLEL_IO")
IF (HAVE_API2_FUNCTIONS)
MESSAGE (STATUS "IPPL version is OK")
ELSE (HAVE_API2_FUNCTIONS)
MESSAGE (ERROR "IPPL >= 2 required")
ENDIF (HAVE_API2_FUNCTIONS)
\ No newline at end of file
#
# Find MITHRA package
# https://github.com/aryafallahi/mithra
#
# MITHRA_INCLUDE_DIR
# MITHRA_LIBRARY_DIR
# MITHRA_FOUND
find_path (MITHRA_INCLUDE_DIR mithra/classes.h
HINTS $ENV{MITHRA_INCLUDE_DIR} $ENV{MITHRA_INCLUDE_PATH} $ENV{MITHRA_PREFIX}/include $ENV{MITHRA}/include
)
find_path (MITHRA_LIBRARY_DIR libmithra.a
HINTS $ENV{MITHRA_LIBRARY_DIR} $ENV{MITHRA_LIBRARY_PATH} $ENV{MITHRA_PREFIX}/lib $ENV{MITHRA}/lib
)
if (MITHRA_INCLUDE_DIR AND MITHRA_LIBRARY_DIR)
set (MITHRA_FOUND "YES")
endif ()
if (MITHRA_FOUND)
if (NOT MITHRA_FIND_QUIETLY)
message (STATUS "Found MITHRA include dir: ${MITHRA_INCLUDE_DIR}")
message (STATUS "Found MITHRA library dir: ${MITHRA_LIBRARY_DIR}")
endif ()
else (MITHRA_FOUND)
if (MITHRA_FIND_REQUIRED)
if (NOT MITHRA_INCLUDE_DIR)
message (WARNING
"MITHRA include directory was not found! "
"Make sure that MITHRA is compiled and that "
"the directory mithra/include/mithra has been automatically created. "
"Also make sure that at least one of the following "
"environment variables is set: "
"MITHRA_INCLUDE_DIR, MITHRA_INCLUDE_PATH, MITHRA_PREFIX, or MITHRA.")
endif ()
if (NOT MITHRA_LIBRARY_DIR)
message (WARNING
"MITHRA library was not found! "
"Make sure that MITHRA is compiled and that "
"the directory mithra/lib has been automatically created. "
"Also make sure that at least one of the following "
"environment variables is set: "
"MITHRA_LIBRARY_DIR, MITHRA_LIBRARY_PATH, MITHRA_PREFIX, or MITHRA.")
endif ()
message (STATUS "MITHRA can be downloaded and compiled from https://github.com/aryafallahi/mithra.git")
message (FATAL_ERROR "Could not find MITHRA!")
endif (MITHRA_FIND_REQUIRED)
endif (MITHRA_FOUND)
This diff is collapsed.