Commit dfa8ace6 authored by gsell's avatar gsell

Merge branch '396-cleanup-cmakelists-txt-in-tests-and-tools' into 'master'

Resolve "Cleanup CMakeLists.txt in tests and tools"

Closes #396

See merge request OPAL/src!208
parents 2b348fca 03bb03f7
......@@ -3,8 +3,8 @@ find_package (GTest REQUIRED)
set (TEST_EXE opal_unit_tests)
set (SRC_DIRS classic_src opal_src)
add_compile_options (${IPPL_CMAKE_CXX_FLAGS} )
add_definitions (-DPARALLEL_IO -DWITH_UNIT_TESTS)
add_definitions (-DPARALLEL_IO)
add_definitions (-DWITH_UNIT_TESTS)
set (TEST_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
macro (add_sources)
......@@ -79,3 +79,11 @@ target_link_libraries (
${GTEST_BOTH_LIBRARIES}
pthread
)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -16,3 +16,11 @@ include_directories (
)
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -7,4 +7,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -5,3 +5,11 @@ add_subdirectory (Fields)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
add_subdirectory (Interpolation)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,10 @@ include_directories (
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -8,4 +8,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
add_subdirectory (Particle)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE)
\ No newline at end of file
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -6,4 +6,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -8,3 +8,11 @@ include_directories (
)
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -5,3 +5,11 @@ add_subdirectory (Sample)
add_subdirectory (Utilities)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -7,4 +7,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -10,4 +10,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -6,4 +6,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -5,4 +5,12 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
add_sources(${_SRCS})
\ No newline at end of file
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -7,3 +7,11 @@ include_directories (
)
add_sources(${_SRCS})
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -10,5 +10,13 @@ endif ()
option (ENABLE_MSLANG "Compile MSLang stand-alone compiler" OFF)
if (ENABLE_MSLANG)
ADD_SUBDIRECTORY(mslang)
add_subdirectory (mslang)
endif ()
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
PROJECT (StandAloneSDDSReader)
SET (StandAloneSDDSReader_VERSION_MAJOR 0)
SET (StandAloneSDDSReader_VERSION_MINOR 1)
cmake_minimum_required (VERSION 2.8.10)
project (StandAloneSDDSReader)
set (StandAloneSDDSReader_VERSION_MAJOR 0)
set (StandAloneSDDSReader_VERSION_MINOR 1)
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
set (CMAKE_CXX_FLAGS
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
add_definitions (-DPARALLEL_IO)
SET (PARSERPATH "${CMAKE_SOURCE_DIR}/src/Structure")
set (PARSERPATH "${CMAKE_SOURCE_DIR}/src/Structure")
INCLUDE_DIRECTORIES (
include_directories (
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/Classic
)
SET (SRCS
set (SRCS
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser.cpp
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/array.cpp
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/associate.cpp
......@@ -32,14 +30,22 @@ SET (SRCS
${CMAKE_SOURCE_DIR}/src/Classic/Utilities/ClassicException.cpp
)
SET (LIBS
set (LIBS
${Boost_LIBRARIES}
${MPI_LIBRARIES}
z
dl
)
ADD_EXECUTABLE( SDDSReader main.cpp ${SRCS})
TARGET_LINK_LIBRARIES( SDDSReader ${LIBS} )
add_executable (SDDSReader main.cpp ${SRCS})
target_link_libraries (SDDSReader ${LIBS})
INSTALL(TARGETS SDDSReader RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
\ No newline at end of file
install (TARGETS SDDSReader RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
cmake_policy(SET CMP0048 NEW)
PROJECT (MSLANG VERSION 0.1)
#SET (MSLANG_VERSION_MAJOR 0)
#SET (MSLANG_VERSION_MINOR 1)
SET (IPPL_CXX_FLAGS
"-DIPPL_LINUX -DIPPL_STRINGSTREAM -DIPPL_MPI -DMPICH_SKIP_MPICXX -DIPPL_DONT_POOL -DIPPL_USE_XDIV_RNG -DIPPL_USE_PARTIAL_SPECIALIZATION -Drestrict=__restrict__ -DNOCTAssert ${IPPL_CXX_FLAGS}"
)
SET (CMAKE_CXX_FLAGS
"${OTHER_CXX_FLAGS} ${IPPL_CXX_FLAGS} ${CMAKE_CXX_FLAGS} "
)
INCLUDE_DIRECTORIES (
cmake_minimum_required (VERSION 2.8.10)
cmake_policy (SET CMP0048 NEW)
project (MSLANG)
set (MSLANG_VERSION_MAJOR 0)
set (MSLANG_VERSION_MINOR 1)
add_definitions (-DIPPL_MPI)
add_definitions (-DIPPL_DONT_POOL)
add_definitions (-DIPPL_USE_XDIV_RNG)
add_definitions (-DIPPL_USE_PARTIAL_SPECIALIZATION)
add_definitions (-DNOCTAssert)
include_directories (
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/Classic
${CMAKE_SOURCE_DIR}/ippl/src
${GSL_INCLUDE_DIR}
)
LINK_DIRECTORIES (
link_directories (
${IPPL_LIBRARY_DIR}
${CMAKE_SOURCE_DIR}/src
)
SET (MSLANG_LIBS
set (MSLANG_LIBS
libOPAL
${OPTP_LIBS}
${OPTP_LIBRARY}
......@@ -39,8 +36,16 @@ SET (MSLANG_LIBS
z
)
MESSAGE( STATUS "Compiling MSLang")
ADD_EXECUTABLE( mslang mslang.cpp )
TARGET_LINK_LIBRARIES( mslang ${MSLANG_LIBS} )
message (STATUS "Compiling MSLang")
add_executable (mslang mslang.cpp)
target_link_libraries (mslang ${MSLANG_LIBS})
install (TARGETS mslang RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
INSTALL(TARGETS mslang RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.10)
PROJECT (OPAL2SDDS)
SET (OPAL2SDDS_VERSION_MAJOR 0)
SET (OPAL2SDDS_VERSION_MINOR 1)
cmake_minimum_required (VERSION 2.8.10)
project (OPAL2SDDS)
set (OPAL2SDDS_VERSION_MAJOR 0)
set (OPAL2SDDS_VERSION_MINOR 1)
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
set (CMAKE_CXX_FLAGS
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
add_definitions (-DPARALLEL_IO)
INCLUDE_DIRECTORIES (
include_directories (
${SDDS_INCLUDE_DIR}
${H5Hut_INCLUDE_DIR}
${HDF5_INCLUDE_DIR}
)
LINK_DIRECTORIES (
link_directories (
${SDDS_LIBRARY_DIR}
)
SET (SDDS_LIBS
set (SDDS_LIBS
mdbcommon
SDDS1
mdblib
......@@ -31,7 +29,15 @@ SET (SDDS_LIBS
dl
)
ADD_EXECUTABLE( opal2sdds main.cpp )
TARGET_LINK_LIBRARIES( opal2sdds ${SDDS_LIBS} )
add_executable (opal2sdds main.cpp)
target_link_libraries (opal2sdds ${SDDS_LIBS})
INSTALL(TARGETS opal2sdds RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -24,4 +24,12 @@ SET (SDDS_LIBS
ADD_EXECUTABLE( sdds2opal main.cpp )
TARGET_LINK_LIBRARIES( sdds2opal ${SDDS_LIBS} )
INSTALL(TARGETS sdds2opal RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
\ No newline at end of file
INSTALL(TARGETS sdds2opal RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment