Commit 03bb03f7 authored by gsell's avatar gsell
Browse files

Cleanup CMakeLists.txt in tests and tools

parent 33008b70
...@@ -3,8 +3,8 @@ find_package (GTest REQUIRED) ...@@ -3,8 +3,8 @@ find_package (GTest REQUIRED)
set (TEST_EXE opal_unit_tests) set (TEST_EXE opal_unit_tests)
set (SRC_DIRS classic_src opal_src) set (SRC_DIRS classic_src opal_src)
add_compile_options (${IPPL_CMAKE_CXX_FLAGS} ) add_definitions (-DPARALLEL_IO)
add_definitions (-DPARALLEL_IO -DWITH_UNIT_TESTS) add_definitions (-DWITH_UNIT_TESTS)
set (TEST_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set (TEST_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
macro (add_sources) macro (add_sources)
...@@ -79,3 +79,11 @@ target_link_libraries ( ...@@ -79,3 +79,11 @@ target_link_libraries (
${GTEST_BOTH_LIBRARIES} ${GTEST_BOTH_LIBRARIES}
pthread 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 ( ...@@ -16,3 +16,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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 ( ...@@ -8,3 +8,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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) ...@@ -5,3 +5,11 @@ add_subdirectory (Fields)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE) 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) add_subdirectory (Interpolation)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE) 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 ( ...@@ -13,3 +13,10 @@ include_directories (
add_sources(${_SRCS}) 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:
...@@ -9,3 +9,11 @@ include_directories ( ...@@ -9,3 +9,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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) add_subdirectory (Particle)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE) 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,3 +7,11 @@ include_directories ( ...@@ -7,3 +7,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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 ( ...@@ -8,3 +8,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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) ...@@ -5,3 +5,11 @@ add_subdirectory (Sample)
add_subdirectory (Utilities) add_subdirectory (Utilities)
set (TEST_SRCS_LOCAL ${TEST_SRCS_LOCAL} PARENT_SCOPE) 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:
...@@ -8,3 +8,11 @@ include_directories ( ...@@ -8,3 +8,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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:
...@@ -11,3 +11,11 @@ include_directories ( ...@@ -11,3 +11,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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 ( ...@@ -7,3 +7,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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,3 +6,11 @@ include_directories ( ...@@ -6,3 +6,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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 ( ...@@ -7,3 +7,11 @@ include_directories (
) )
add_sources(${_SRCS}) 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 () ...@@ -10,5 +10,13 @@ endif ()
option (ENABLE_MSLANG "Compile MSLang stand-alone compiler" OFF) option (ENABLE_MSLANG "Compile MSLang stand-alone compiler" OFF)
if (ENABLE_MSLANG) if (ENABLE_MSLANG)
ADD_SUBDIRECTORY(mslang) add_subdirectory (mslang)
endif () 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) cmake_minimum_required (VERSION 2.8.10)
PROJECT (StandAloneSDDSReader) project (StandAloneSDDSReader)
SET (StandAloneSDDSReader_VERSION_MAJOR 0) set (StandAloneSDDSReader_VERSION_MAJOR 0)
SET (StandAloneSDDSReader_VERSION_MINOR 1) set (StandAloneSDDSReader_VERSION_MINOR 1)
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
set (CMAKE_CXX_FLAGS add_definitions (-DPARALLEL_IO)
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
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
${CMAKE_SOURCE_DIR}/src/Classic ${CMAKE_SOURCE_DIR}/src/Classic
) )
SET (SRCS set (SRCS
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser.cpp ${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser.cpp
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/array.cpp ${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/array.cpp
${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/associate.cpp ${CMAKE_SOURCE_DIR}/src/Structure/SDDSParser/associate.cpp
...@@ -32,14 +30,22 @@ SET (SRCS ...@@ -32,14 +30,22 @@ SET (SRCS
${CMAKE_SOURCE_DIR}/src/Classic/Utilities/ClassicException.cpp ${CMAKE_SOURCE_DIR}/src/Classic/Utilities/ClassicException.cpp
) )
SET (LIBS set (LIBS
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${MPI_LIBRARIES} ${MPI_LIBRARIES}
z z
dl dl
) )
ADD_EXECUTABLE( SDDSReader main.cpp ${SRCS}) add_executable (SDDSReader main.cpp ${SRCS})
TARGET_LINK_LIBRARIES( SDDSReader ${LIBS} ) target_link_libraries (SDDSReader ${LIBS})
INSTALL(TARGETS SDDSReader RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") install (TARGETS SDDSReader RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
\ No newline at end of file
# 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_minimum_required (VERSION 2.8.10)
cmake_policy(SET CMP0048 NEW) cmake_policy (SET CMP0048 NEW)
PROJECT (MSLANG VERSION 0.1) project (MSLANG)
set (MSLANG_VERSION_MAJOR 0)
#SET (MSLANG_VERSION_MAJOR 0) set (MSLANG_VERSION_MINOR 1)
#SET (MSLANG_VERSION_MINOR 1)
add_definitions (-DIPPL_MPI)
SET (IPPL_CXX_FLAGS add_definitions (-DIPPL_DONT_POOL)
"-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}" add_definitions (-DIPPL_USE_XDIV_RNG)
) add_definitions (-DIPPL_USE_PARTIAL_SPECIALIZATION)
add_definitions (-DNOCTAssert)
SET (CMAKE_CXX_FLAGS
"${OTHER_CXX_FLAGS} ${IPPL_CXX_FLAGS} ${CMAKE_CXX_FLAGS} " include_directories (
)
INCLUDE_DIRECTORIES (
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/Classic ${CMAKE_SOURCE_DIR}/src/Classic
${CMAKE_SOURCE_DIR}/ippl/src ${CMAKE_SOURCE_DIR}/ippl/src
${GSL_INCLUDE_DIR} ${GSL_INCLUDE_DIR}
) )
LINK_DIRECTORIES ( link_directories (
${IPPL_LIBRARY_DIR} ${IPPL_LIBRARY_DIR}
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
) )
SET (MSLANG_LIBS set (MSLANG_LIBS
libOPAL libOPAL
${OPTP_LIBS} ${OPTP_LIBS}
${OPTP_LIBRARY} ${OPTP_LIBRARY}
...@@ -39,8 +36,16 @@ SET (MSLANG_LIBS ...@@ -39,8 +36,16 @@ SET (MSLANG_LIBS
z z
) )
MESSAGE( STATUS "Compiling MSLang") message (STATUS "Compiling MSLang")
ADD_EXECUTABLE( mslang mslang.cpp ) add_executable (mslang mslang.cpp)
TARGET_LINK_LIBRARIES( mslang ${MSLANG_LIBS} ) target_link_libraries (mslang ${MSLANG_LIBS})
install (TARGETS mslang RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# vi: set et ts=4 sw=4 sts=4:
INSTALL(TARGETS mslang RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") # Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.10) cmake_minimum_required (VERSION 2.8.10)
PROJECT (OPAL2SDDS) project (OPAL2SDDS)
SET (OPAL2SDDS_VERSION_MAJOR 0) set (OPAL2SDDS_VERSION_MAJOR 0)
SET (OPAL2SDDS_VERSION_MINOR 1) set (OPAL2SDDS_VERSION_MINOR 1)
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
set (CMAKE_CXX_FLAGS add_definitions (-DPARALLEL_IO)
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
INCLUDE_DIRECTORIES ( include_directories (
${SDDS_INCLUDE_DIR} ${SDDS_INCLUDE_DIR}
${H5Hut_INCLUDE_DIR} ${H5Hut_INCLUDE_DIR}
${HDF5_INCLUDE_DIR} ${HDF5_INCLUDE_DIR}
) )
LINK_DIRECTORIES ( link_directories (
${SDDS_LIBRARY_DIR} ${SDDS_LIBRARY_DIR}
) )
SET (SDDS_LIBS set (SDDS_LIBS
mdbcommon mdbcommon
SDDS1 SDDS1
mdblib mdblib
...@@ -31,7 +29,15 @@ SET (SDDS_LIBS ...@@ -31,7 +29,15 @@ SET (SDDS_LIBS
dl dl
) )
ADD_EXECUTABLE( opal2sdds main.cpp ) add_executable (opal2sdds main.cpp)
TARGET_LINK_LIBRARIES( opal2sdds ${SDDS_LIBS} ) target_link_libraries (opal2sdds ${SDDS_LIBS})
INSTALL(TARGETS opal2sdds RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") 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:
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