2014-05-25 11:11:44 +02:00
|
|
|
|
2010-09-12 21:09:39 +02:00
|
|
|
SET(CosmoTool_SRCS
|
|
|
|
fortran.cpp
|
|
|
|
interpolate.cpp
|
|
|
|
load_data.cpp
|
|
|
|
loadGadget.cpp
|
|
|
|
loadRamses.cpp
|
|
|
|
powerSpectrum.cpp
|
2010-09-12 21:22:20 +02:00
|
|
|
miniargs.cpp
|
2010-12-01 16:04:04 +01:00
|
|
|
growthFactor.cpp
|
2012-12-13 16:39:27 +01:00
|
|
|
cosmopower.cpp
|
2015-02-10 14:20:09 +01:00
|
|
|
cic.cpp
|
2010-09-12 21:09:39 +02:00
|
|
|
)
|
|
|
|
|
2014-06-03 09:51:26 +02:00
|
|
|
IF (ENABLE_OPENMP)
|
|
|
|
ENDIF (ENABLE_OPENMP)
|
|
|
|
|
2015-04-07 14:45:38 +02:00
|
|
|
IF (YORICK_SUPPORT)
|
|
|
|
IF(FOUND_NETCDF3)
|
2012-09-19 15:15:09 +02:00
|
|
|
SET(CosmoTool_SRCS ${CosmoTool_SRCS} yorick_nc3.cpp)
|
2015-04-07 14:45:38 +02:00
|
|
|
ELSE(FOUND_NETCDF3)
|
|
|
|
IF(FOUND_NETCDF4)
|
2012-09-19 15:15:09 +02:00
|
|
|
SET(CosmoTool_SRCS ${CosmoTool_SRCS} yorick_nc4.cpp)
|
2015-04-07 14:45:38 +02:00
|
|
|
ENDIF(FOUND_NETCDF4)
|
|
|
|
ENDIF(FOUND_NETCDF3)
|
|
|
|
ENDIF(YORICK_SUPPORT)
|
2012-09-20 07:59:46 +02:00
|
|
|
|
2012-09-19 15:15:09 +02:00
|
|
|
|
2011-06-06 15:56:54 +02:00
|
|
|
if (HDF5_FOUND)
|
|
|
|
set(CosmoTool_SRCS ${CosmoTool_SRCS}
|
|
|
|
h5_readFlash.cpp
|
|
|
|
loadFlash.cpp
|
|
|
|
)
|
2011-06-28 15:08:14 +02:00
|
|
|
else(HDF5_FOUND)
|
|
|
|
set(CosmoTool_SRCS ${CosmoTool_SRCS}
|
|
|
|
loadFlash_dummy.cpp
|
|
|
|
)
|
2011-06-06 15:56:54 +02:00
|
|
|
endif (HDF5_FOUND)
|
|
|
|
|
2010-09-12 21:22:20 +02:00
|
|
|
SET(CosmoTool_SRCS ${CosmoTool_SRCS}
|
2010-09-12 21:09:39 +02:00
|
|
|
bqueue.hpp
|
|
|
|
config.hpp
|
|
|
|
dinterpolate.hpp
|
|
|
|
field.hpp
|
|
|
|
fixArray.hpp
|
|
|
|
fortran.hpp
|
|
|
|
interpolate3d.hpp
|
|
|
|
interpolate.hpp
|
|
|
|
kdtree_leaf.hpp
|
|
|
|
load_data.hpp
|
|
|
|
loadGadget.hpp
|
|
|
|
loadRamses.hpp
|
|
|
|
loadSimu.hpp
|
|
|
|
miniargs.hpp
|
|
|
|
mykdtree.hpp
|
|
|
|
octTree.hpp
|
|
|
|
powerSpectrum.hpp
|
|
|
|
sparseGrid.hpp
|
|
|
|
sphSmooth.hpp
|
|
|
|
yorick.hpp
|
2010-12-01 16:04:04 +01:00
|
|
|
growthFactor.hpp
|
2010-09-12 21:09:39 +02:00
|
|
|
)
|
|
|
|
|
2015-04-07 14:45:38 +02:00
|
|
|
include_directories(${GSL_INCLUDE_PATH} ${CMAKE_BINARY_DIR}/src)
|
2011-06-06 15:56:54 +02:00
|
|
|
|
2015-04-07 14:45:38 +02:00
|
|
|
set(CosmoTool_LIBS ${GSL_LIBRARIES})
|
|
|
|
if(YORICK_SUPPORT)
|
|
|
|
set(CosmoTool_LIBS ${CosmoTool_LIBS} ${NETCDFCPP_LIBRARY} ${NETCDF_LIBRARY} ${GSL_LIBRARIES})
|
|
|
|
include_directories(${NETCDF_INCLUDE_PATH} ${NETCDFCPP_INCLUDE_PATH})
|
|
|
|
endif(YORICK_SUPPORT)
|
2011-06-06 15:56:54 +02:00
|
|
|
if (HDF5_FOUND)
|
|
|
|
set(CosmoTool_LIBS ${CosmoTool_LIBS} ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES})
|
|
|
|
include_directories(${HDF5_INCLUDE_DIRS})
|
|
|
|
endif (HDF5_FOUND)
|
|
|
|
|
2012-09-13 03:30:20 +02:00
|
|
|
set(CosmoTool_LIBS ${CosmoTool_LIBS} PARENT_SCOPE)
|
|
|
|
|
2011-06-28 15:08:14 +02:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
add_library(CosmoTool SHARED ${CosmoTool_SRCS})
|
|
|
|
target_link_libraries(CosmoTool ${CosmoTool_LIBS})
|
|
|
|
if (BUILD_STATIC_LIBS)
|
|
|
|
add_library(CosmoTool_static STATIC ${CosmoTool_SRCS})
|
2015-02-10 13:43:05 +01:00
|
|
|
set_target_properties(CosmoTool_static PROPERTIES COMPILE_FLAGS "${CMAKE_C_COMPILE_OPTIONS_PIC}")
|
2011-06-28 15:08:14 +02:00
|
|
|
endif(BUILD_STATIC_LIBS)
|
|
|
|
else (BUILD_SHARED_LIBS)
|
2012-09-13 03:30:20 +02:00
|
|
|
add_library(CosmoTool STATIC ${CosmoTool_SRCS})
|
2015-02-10 13:43:05 +01:00
|
|
|
set_target_properties(CosmoTool PROPERTIES COMPILE_FLAGS "${CMAKE_C_COMPILE_OPTIONS_PIC}")
|
2011-06-28 15:08:14 +02:00
|
|
|
endif (BUILD_SHARED_LIBS)
|
2010-09-12 21:09:39 +02:00
|
|
|
|
|
|
|
install(TARGETS CosmoTool
|
2010-09-15 20:51:18 +02:00
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib)
|
2011-06-28 15:08:14 +02:00
|
|
|
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
install(TARGETS CosmoTool_static
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
endif (BUILD_SHARED_LIBS)
|
|
|
|
|
2010-09-12 21:09:39 +02:00
|
|
|
install(DIRECTORY . DESTINATION include/CosmoTool
|
|
|
|
FILES_MATCHING PATTERN "*.hpp")
|
2014-05-22 09:27:53 +02:00
|
|
|
install(DIRECTORY ${OMPTL_BUILD_DIR}
|
|
|
|
DESTINATION include/CosmoTool/omptl)
|
2010-09-12 21:09:39 +02:00
|
|
|
install(DIRECTORY . DESTINATION include/CosmoTool
|
|
|
|
FILES_MATCHING PATTERN "*.tcc")
|