Commit 080163d9 authored by gsell's avatar gsell
Browse files

Cleanup CMakeLists.txt in IPPL

parent 33008b70
SET(${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}") set (${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}")
SET(${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include") set (${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
SET(${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib") set (${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib")
SET(${PROJECT_NAME}_LIBRARY "ippl") set (${PROJECT_NAME}_LIBRARY "ippl")
\ No newline at end of file
SET (_SRCS set (_SRCS
) )
SET (_HDRS set (_HDRS
ParticleAmrLayout.h ParticleAmrLayout.h
AmrParticleBase.h AmrParticleBase.h
AmrParticleBase.hpp AmrParticleBase.hpp
AmrParticleLevelCounter.h AmrParticleLevelCounter.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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 AntiSymTenzor.h
AppTypeTraits.h AppTypeTraits.h
dcomplex.h dcomplex.h
...@@ -19,11 +19,20 @@ SET (_HDRS ...@@ -19,11 +19,20 @@ SET (_HDRS
Vektor.h Vektor.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) add_ippl_sources (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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}\") ...@@ -23,47 +23,6 @@ set (IPPL_COMPILE_USER \"${WHOAMI_OUT}\")
configure_file (IpplVersions.h.in ${CMAKE_CURRENT_SOURCE_DIR}/IpplVersions.h) 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}) set (IPPL_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
macro (add_ippl_sources) macro (add_ippl_sources)
file (RELATIVE_PATH _relPath "${IPPL_SRC_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") file (RELATIVE_PATH _relPath "${IPPL_SRC_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
...@@ -147,6 +106,7 @@ install (TARGETS ippl DESTINATION lib) ...@@ -147,6 +106,7 @@ install (TARGETS ippl DESTINATION lib)
install (FILES ${IPPL_BASEDIR_HDRS} DESTINATION include) install (FILES ${IPPL_BASEDIR_HDRS} DESTINATION include)
# vi: set et ts=4 sw=4 sts=4: # vi: set et ts=4 sw=4 sts=4:
# Local Variables: # Local Variables:
# mode:cmake # mode:cmake
# cmake-tab-width: 4 # cmake-tab-width: 4
......
SET (_SRCS set (_SRCS
DataSource.cpp DataSource.cpp
DataConnect.cpp DataConnect.cpp
DataConnectCreator.cpp DataConnectCreator.cpp
...@@ -7,7 +7,7 @@ SET (_SRCS ...@@ -7,7 +7,7 @@ SET (_SRCS
PtclBaseDataSource.cpp PtclBaseDataSource.cpp
) )
SET (_HDRS set (_HDRS
DataConnectCreator.h DataConnectCreator.h
DataConnect.h DataConnect.h
DataSource.h DataSource.h
...@@ -31,11 +31,19 @@ SET (_HDRS ...@@ -31,11 +31,19 @@ SET (_HDRS
StringDataSource.h StringDataSource.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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.hpp
DomainMap.h DomainMap.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/DomainMap)
ADD_IPPL_SOURCES (${_SRCS}) # vi: set et ts=4 sw=4 sts=4:
ADD_IPPL_HEADERS (${_HDRS})
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 ( ...@@ -17,4 +17,10 @@ include_directories (
add_ippl_sources (${_SRCS}) add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS}) 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 Assign.hpp
AssignDefs.h AssignDefs.h
AssignGeneralBF.hpp AssignGeneralBF.hpp
...@@ -34,11 +34,19 @@ SET (_HDRS ...@@ -34,11 +34,19 @@ SET (_HDRS
ReductionLoc.h ReductionLoc.h
) )
INCLUDE_DIRECTORIES ( include_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Field)
ADD_IPPL_SOURCES (${_SRCS}) # vi: set et ts=4 sw=4 sts=4:
ADD_IPPL_HEADERS (${_HDRS})
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 FieldLayoutUser.cpp
MultiBalancer.cpp MultiBalancer.cpp
VRB.cpp VRB.cpp
) )
SET (_HDRS set (_HDRS
BinaryBalancer.hpp BinaryBalancer.hpp
BinaryBalancer.h BinaryBalancer.h
CenteredFieldLayout.hpp CenteredFieldLayout.hpp
...@@ -21,11 +21,19 @@ SET (_HDRS ...@@ -21,11 +21,19 @@ SET (_HDRS
VRB.h VRB.h
) )
INCLUDE_DIRECTORIES ( include_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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:
...@@ -38,7 +38,7 @@ std::ostream& operator<<(std::ostream&, const Vnode<Dim>&); ...@@ -38,7 +38,7 @@ std::ostream& operator<<(std::ostream&, const Vnode<Dim>&);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
template<unsigned Dim> template<unsigned Dim>
class Vnode : public RefCounted, public Pooled< Vnode<Dim> > class Vnode : public RefCounted //, public Pooled< Vnode<Dim> >
{ {
private: private:
......
SET (_SRCS set (_SRCS
Index.cpp Index.cpp
) )
SET (_HDRS set (_HDRS
IndexedSIndex.h IndexedSIndex.h
Index.h Index.h
IndexInlines.h IndexInlines.h
...@@ -16,11 +16,19 @@ SET (_HDRS ...@@ -16,11 +16,19 @@ SET (_HDRS
SOffset.h SOffset.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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 Centering.cpp
) )
SET (_HDRS set (_HDRS
CartesianCentering.hpp CartesianCentering.hpp
CartesianCentering.h CartesianCentering.h
Cartesian.hpp Cartesian.hpp
...@@ -15,11 +15,19 @@ SET (_HDRS ...@@ -15,11 +15,19 @@ SET (_HDRS
UniformCartesian.h UniformCartesian.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) ADD_IPPL_SOURCES (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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 CRC.cpp
Communicate.cpp Communicate.cpp
CommCreator.cpp CommCreator.cpp
...@@ -7,7 +7,7 @@ SET (_SRCS ...@@ -7,7 +7,7 @@ SET (_SRCS
Formatter.cpp Formatter.cpp
) )
SET (_HDRS set (_HDRS
CommCreator.h CommCreator.h
CommMPI.h CommMPI.h
CommPM.h CommPM.h
...@@ -25,11 +25,19 @@ SET (_HDRS ...@@ -25,11 +25,19 @@ SET (_HDRS
Tags.h Tags.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Message)
ADD_IPPL_SOURCES (${_SRCS}) # vi: set et ts=4 sw=4 sts=4:
ADD_IPPL_HEADERS (${_HDRS})
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 IpplExpressions.h
IpplTypeComputations.h IpplTypeComputations.h
PETE.h PETE.h
TypeComputations.h TypeComputations.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) add_ippl_sources (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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 BoxParticleCachingPolicy.h
CellParticleCachingPolicy.h CellParticleCachingPolicy.h
GenArrayParticle.h GenArrayParticle.h
...@@ -44,13 +44,22 @@ SET (_HDRS ...@@ -44,13 +44,22 @@ SET (_HDRS
PAssign.h PAssign.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${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}) # vi: set et ts=4 sw=4 sts=4:
ADD_IPPL_HEADERS (${_HDRS})
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 BasicPairBuilder.h
HashPairBuilder.h HashPairBuilder.h
HashPairBuilderPeriodic.h HashPairBuilderPeriodic.h
...@@ -9,11 +9,19 @@ SET (_HDRS ...@@ -9,11 +9,19 @@ SET (_HDRS
SortingPairBuilder.h SortingPairBuilder.h
) )
INCLUDE_DIRECTORIES ( include_directories (
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
ADD_IPPL_SOURCES (${_SRCS}) add_ippl_sources (${_SRCS})
ADD_IPPL_HEADERS (${_HDRS}) 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