Commit 388de2bb authored by gsell's avatar gsell

Merge branch '393-cleanup-cmakelists-txt-in-ippl' into 'master'

Resolve "Cleanup CMakeLists.txt in IPPL"

Closes #393

See merge request OPAL/src!205
parents ed35416b aac49bfb
SET(${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}")
SET(${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
SET(${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib")
SET(${PROJECT_NAME}_LIBRARY "ippl")
\ No newline at end of file
set (${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}")
set (${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
set (${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib")
set (${PROJECT_NAME}_LIBRARY "ippl")
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
ParticleAmrLayout.h
AmrParticleBase.h
AmrParticleBase.hpp
AmrParticleLevelCounter.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/AmrParticle)
install (FILES ${_HDRS} DESTINATION include/AmrParticle)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
AntiSymTenzor.h
AppTypeTraits.h
dcomplex.h
......@@ -19,11 +19,20 @@ SET (_HDRS
Vektor.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/AppTypes)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
INSTALL (FILES ${_HDRS} DESTINATION include/AppTypes)
......@@ -23,47 +23,6 @@ set (IPPL_COMPILE_USER \"${WHOAMI_OUT}\")
configure_file (IpplVersions.h.in ${CMAKE_CURRENT_SOURCE_DIR}/IpplVersions.h)
if (UNUSED)
### print the compiler flags #############################
set (PRETTY_PRINT_WIDTH 78)
string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_STR)
set (COMPILE_FLAGS_STR
"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_STR}}")
string (REGEX REPLACE " +" ";" COMPILE_FLAGS_LIST ${COMPILE_FLAGS_STR})
list (LENGTH COMPILE_FLAGS_LIST NUMBER_OF_COMPILE_FLAGS)
set (CURRENT_FLAG_INDEX 0)
message ("")
message ("Building IPPL with:")
while (${CURRENT_FLAG_INDEX} LESS ${NUMBER_OF_COMPILE_FLAGS})
set (FLAGS_PRETTY_PRINT "")
list (GET COMPILE_FLAGS_LIST ${CURRENT_FLAG_INDEX} CURRENT_FLAG)
string (LENGTH ${CURRENT_FLAG} LENGTH_INCL_NEXT)
while (${LENGTH_INCL_NEXT} LESS ${PRETTY_PRINT_WIDTH})
set (FLAGS_PRETTY_PRINT
"${FLAGS_PRETTY_PRINT} ${CURRENT_FLAG}")
math (EXPR CURRENT_FLAG_INDEX "(${CURRENT_FLAG_INDEX} + 1)")
if (${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
set (LENGTH_INCL_NEXT ${PRETTY_PRINT_WIDTH})
else (${CURRENT_FLAG_INDEX} EQUAL ${NUMBER_OF_COMPILE_FLAGS})
list (GET COMPILE_FLAGS_LIST ${CURRENT_FLAG_INDEX} CURRENT_FLAG)
if (CURRENT_FLAG)
string (LENGTH ${CURRENT_FLAG} LENGTH_CURRENT_FLAG)
math (EXPR LENGTH_INCL_NEXT "${LENGTH_INCL_NEXT} + 1 + ${LENGTH_CURRENT_FLAG}")
endif ()
endif ()
endwhile ()
string (STRIP ${FLAGS_PRETTY_PRINT} FLAGS_PRETTY_PRINT)
message (STATUS "${FLAGS_PRETTY_PRINT}")
endwhile ()
message ("")
endif ()
set (IPPL_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
macro (add_ippl_sources)
file (RELATIVE_PATH _relPath "${IPPL_SRC_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
......@@ -147,6 +106,7 @@ install (TARGETS ippl DESTINATION lib)
install (FILES ${IPPL_BASEDIR_HDRS} DESTINATION include)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode:cmake
# cmake-tab-width: 4
......
SET (_SRCS
set (_SRCS
DataSource.cpp
DataConnect.cpp
DataConnectCreator.cpp
......@@ -7,7 +7,7 @@ SET (_SRCS
PtclBaseDataSource.cpp
)
SET (_HDRS
set (_HDRS
DataConnectCreator.h
DataConnect.h
DataSource.h
......@@ -31,11 +31,19 @@ SET (_HDRS
StringDataSource.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/DataSource)
install (FILES ${_HDRS} DESTINATION include/DataSource)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
DomainMap.hpp
DomainMap.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/DomainMap)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/DomainMap)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -17,4 +17,10 @@ include_directories (
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
#install (FILES ${_HDRS} DESTINATION include/FFT)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
Assign.hpp
AssignDefs.h
AssignGeneralBF.hpp
......@@ -34,11 +34,19 @@ SET (_HDRS
ReductionLoc.h
)
INCLUDE_DIRECTORIES (
include_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Field)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Field)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
FieldLayoutUser.cpp
MultiBalancer.cpp
VRB.cpp
)
SET (_HDRS
set (_HDRS
BinaryBalancer.hpp
BinaryBalancer.h
CenteredFieldLayout.hpp
......@@ -21,11 +21,19 @@ SET (_HDRS
VRB.h
)
INCLUDE_DIRECTORIES (
include_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/FieldLayout)
install (FILES ${_HDRS} DESTINATION include/FieldLayout)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
Index.cpp
)
SET (_HDRS
set (_HDRS
IndexedSIndex.h
Index.h
IndexInlines.h
......@@ -16,11 +16,19 @@ SET (_HDRS
SOffset.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/Index)
install (FILES ${_HDRS} DESTINATION include/Index)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
Centering.cpp
)
SET (_HDRS
set (_HDRS
CartesianCentering.hpp
CartesianCentering.h
Cartesian.hpp
......@@ -15,11 +15,19 @@ SET (_HDRS
UniformCartesian.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/Meshes)
install (FILES ${_HDRS} DESTINATION include/Meshes)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
CRC.cpp
Communicate.cpp
CommCreator.cpp
......@@ -7,7 +7,7 @@ SET (_SRCS
Formatter.cpp
)
SET (_HDRS
set (_HDRS
CommCreator.h
CommMPI.h
CommPM.h
......@@ -25,11 +25,19 @@ SET (_HDRS
Tags.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Message)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Message)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
IpplExpressions.h
IpplTypeComputations.h
PETE.h
TypeComputations.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/PETE)
install (FILES ${_HDRS} DESTINATION include/PETE)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
BoxParticleCachingPolicy.h
CellParticleCachingPolicy.h
GenArrayParticle.h
......@@ -44,13 +44,22 @@ SET (_HDRS
PAssign.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Particle)
add_subdirectory (PairBuilder)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Particle)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
ADD_SUBDIRECTORY (PairBuilder)
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
BasicPairBuilder.h
HashPairBuilder.h
HashPairBuilderPeriodic.h
......@@ -9,11 +9,19 @@ SET (_HDRS
SortingPairBuilder.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/Particle/PairBuilder)
install (FILES ${_HDRS} DESTINATION include/Particle/PairBuilder)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
Profiler.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Profile)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Profile)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
NDRegion.h
PRegion.h
RegionLayout.hpp
......@@ -9,11 +9,19 @@ SET (_HDRS
Rnode.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Region)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Region)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
SubBareField.hpp
SubBareField.h
SubFieldAssign.hpp
......@@ -13,11 +13,19 @@ SET (_HDRS
SubFieldTraits.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/SubField)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/SubField)
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
)
SET (_HDRS
set (_HDRS
SubParticleAssign.hpp
SubParticleAssignDefs.h
SubParticleAssign.h
......@@ -9,11 +9,19 @@ SET (_HDRS
SubParticleAttrib.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
INSTALL (FILES ${_HDRS} DESTINATION include/SubParticle)
install (FILES ${_HDRS} DESTINATION include/SubParticle)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
SET (_SRCS
set (_SRCS
DiscBuffer.cpp
DiscConfig.cpp
DiscMeta.cpp
......@@ -25,7 +25,7 @@ SET (_SRCS
PAssert.cpp
)
SET (_HDRS
set (_HDRS
DiscBuffer.h
DiscConfig.h
DiscField.hpp
......@@ -83,11 +83,19 @@ SET (_HDRS
vmap.h
)
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
)
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Utility)
ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS})
# vi: set et ts=4 sw=4 sts=4:
INSTALL (FILES ${_HDRS} DESTINATION include/Utility)
\ No newline at end of file
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
FILE (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
MESSAGE (STATUS "Only found stub of CMakeList.txt in ${_relPath}")
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
message (STATUS "Only found stub of CMakeList.txt in ${_relPath}")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
IF ( ENABLE_AMR )
if (ENABLE_AMR)
# FIXME Why do we need this?
# remove digits from hostname: edison03 -> edison
STRING(REGEX MATCH "[^0-9]*" HOSTNAME_BASE "${HOSTNAME}")
string (REGEX MATCH "[^0-9]*" HOSTNAME_BASE "${HOSTNAME}")
IF (${HOSTNAME_BASE} MATCHES "daint")
if (${HOSTNAME_BASE} MATCHES "daint")
set(MPI_CXX_LIBRARIES "-lmpich -lmpichcxx -lfmpich -lmpichf90")
ENDIF (${HOSTNAME_BASE} MATCHES "daint")
endif ()
set (CMAKE_Fortran_FLAGS