1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
# - CMAKE Project file for the MADNESS package
# The following variables are defined:
# MADNESS_INCLUDE_DIRS - The MADNESS include directory
# MADNESS_LIBRARIES - The MADNESS libraries and their dependencies
# MADNESS_<COMPONENT>_LIBRARY - The MADNESS COMPONENT library
# MADNESS_COMPILE_FLAGS - Compile flags required to build with MADNESS
# MADNESS_LINKER_FLAGS - Linker flags required to link with MADNESS
# MADNESS_VERSION - MADNESS version number
# MADNESS_F77_INTEGER_SIZE - The default F77 integer size used for BLAS calls
# Compute paths
set(MADNESS_SOURCE_DIR @abs_top_srcdir@)
set(MADNESS_BUILD_DIR @abs_top_builddir@)
set(MADNESS_INCLUDE_DIRS ${MADNESS_SOURCE_DIR}/src ${MADNESS_BUILD_DIR}/src)
# Set package version
set(MADNESS_VERSION "@PACKAGE_VERSION@")
# Set compile and link flags, and remove optimization and debug flags
string(REGEX REPLACE "-(O[0-9s]|g[0-9]?)([ ]+|$)" "" MADNESS_COMPILE_FLAGS "@CPPFLAGS@ @CXXFLAGS@")
string(STRIP "${MADNESS_COMPILE_FLAGS}" MADNESS_COMPILE_FLAGS)
string(REGEX REPLACE "-(O[0-9s]|g[0-9]?)([ ]+|$)" "" MADNESS_LINKER_FLAGS "@CXXFLAGS@ @LDFLAGS@")
string(STRIP "${MADNESS_LINKER_FLAGS}" MADNESS_LINKER_FLAGS)
set(MADNESS_BUILD_SHARED @enable_shared@)
set(MADNESS_BUILD_STATIC @enable_static@)
# Set variables for shared library paths
if(MADNESS_BUILD_SHARED)
set(MADNESS_MADworld_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/world/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADworld${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADmisc_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/misc/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADmisc${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADtensor_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/tensor/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADtensor${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADlinalg_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/tensor/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADlinalg${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADmra_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/mra/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADmra${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADmuparser_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/external/muparser/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADmuparser${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADtinyxml_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/external/tinyxml/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADtinyxml${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MADNESS_MADchem_SHARED_LIBRARY
${MADNESS_BUILD_DIR}/src/apps/chem/.libs/${CMAKE_SHARED_LIBRARY_PREFIX}MADchem${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
# Set variables for static library paths
if(MADNESS_BUILD_STATIC)
set(MADNESS_MADworld_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/world/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADworld${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADmisc_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/misc/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADmisc${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADtensor_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/tensor/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADtensor${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADlinalg_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/tensor/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADlinalg${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADmra_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/mra/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADmra${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADmuparser_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/external/muparser/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADmuparser${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADtinyxml_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/madness/external/tinyxml/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADtinyxml${CMAKE_STATIC_LIBRARY_SUFFIX})
set(MADNESS_MADchem_STATIC_LIBRARY
${MADNESS_BUILD_DIR}/src/apps/chem/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}MADchem${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
# Set default libraries
foreach(_lib MADchem MADmra MADtinyxml MADmuparser MADlinalg MADtensor MADmisc MADworld)
if(MADNESS_BUILD_SHARED)
set(MADNESS_${_lib}_LIBRARY ${MADNESS_${_lib}_SHARED_LIBRARY})
else()
set(MADNESS_${_lib}_LIBRARY ${MADNESS_${_lib}_STATIC_LIBRARY})
endif()
list(APPEND MADNESS_LIBRARIES ${MADNESS_${_lib}_LIBRARY})
endforeach()
list(APPEND MADNESS_LIBRARIES "@LIBS@")
# Set Fortran 77 integer size used by MADNESS
set(MADNESS_F77_INTEGER_SIZE @MADNESS_FORTRAN_DEFAULT_INTEGER_SIZE@)
unset(MAD_LIBRARY_PREFIX)
unset(MAD_LIBRARY_SUFFIX)
|