Warning, /JETSCAPE/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 ###########################
0002 ### Initial Cmake Setup ###
0003 ###########################
0004
0005 cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
0006 project (JetScape CXX C)
0007
0008 # Fail if cmake is called in the source directory
0009 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
0010 message("source directory:" ${CMAKE_SOURCE_DIR})
0011 message("binary directory:" ${CMAKE_BINARY_DIR})
0012 message(FATAL_ERROR "You don't want to configure in the source directory!")
0013 endif()
0014
0015 # Default to the release build.
0016 if(NOT CMAKE_BUILD_TYPE)
0017 set(CMAKE_BUILD_TYPE Release)
0018 endif()
0019
0020 # for mac compliance
0021 cmake_policy(SET CMP0042 NEW)
0022 cmake_policy(SET CMP0054 NEW)
0023
0024 # Tell cmake where to find modules
0025 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmakemodules")
0026
0027 ###########################
0028 ### Parse options ###
0029 ###########################
0030
0031 # Unit Tests. Turn off with 'cmake -Dunittests=OFF'.
0032 option(unittests "Build all unittests." ON)
0033
0034 # freestream. Turn on with 'cmake -DUSE_FREESTREAM=ON'.
0035 # Note that some warnings are generated. Could be turned off by adding the following to CFLAGS in
0036 # external_packages/freestream-milne/Makefile
0037 # -Wno-unknown-pragmas -Wno-writable-strings -Wno-return-type -Wc++11-compat-deprecated-writable-strings
0038 option(USE_FREESTREAM "Build tests for freestream-milne" OFF)
0039 if (USE_FREESTREAM)
0040 message("Includes for freestream ...")
0041 include_directories(./external_packages/freestream-milne/src)
0042 endif (USE_FREESTREAM)
0043
0044 # CLVisc. Trun on with 'cmake -DUSE_CLVISC=ON'.
0045 find_package(OpenCL)
0046
0047 option(USE_CLVISC "Build tests for CLVisc" OFF)
0048 if (OPENCL_FOUND)
0049 message("Found OpenCL, try clvisc with cmake -DUSE_CLVISC=ON")
0050 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
0051 if (USE_CLVISC)
0052 message("Includes for clvisc ...")
0053 include_directories(./external_packages/clvisc_wrapper/include/)
0054 include_directories(./external_packages/clvisc_wrapper/)
0055 if(NOT EXISTS "${CMAKE_SOURCE_DIR}/external_packages/PyVisc")
0056 message(FATAL_ERROR "Error: CLVisc source has not been downloaded in external_packages by ./get_clvisc.sh")
0057 endif()
0058 endif (USE_CLVISC)
0059 endif (OPENCL_FOUND)
0060
0061 # IPGlasma. Turn on with 'cmake -DUSE_IPGlasma=ON'.
0062 option(USE_IPGlasma "Build with IPGlasma " OFF)
0063 if (USE_IPGlasma)
0064 message("Includes for IPGlasma ...")
0065 include_directories(./external_packages/ipglasma ./external_packages/ipglasma/src)
0066 endif (USE_IPGlasma)
0067
0068 # MUSIC. Turn on with 'cmake -DUSE_MUSIC=ON'.
0069 option(USE_MUSIC "Build tests for MUSIC" OFF)
0070 if (USE_MUSIC)
0071 message("Includes for music ...")
0072 include_directories(./external_packages/music ./external_packages/music/src)
0073 endif (USE_MUSIC)
0074
0075 # Soft Particlization. Turn on with 'cmake -DUSE_MUSIC=ON -DUSE_ISS=ON'.
0076 option(USE_ISS "Build tests for iSS" OFF)
0077 if (USE_ISS)
0078 message("Includes for iSS ...")
0079 include_directories(./external_packages/iSS ./external_packages/iSS/src)
0080 endif (USE_ISS)
0081
0082 # SMASH afterburner. Turn on with 'cmake -DUSE_MUSIC=ON -DUSE_ISS=ON -Dsmash=ON'.
0083 option(USE_SMASH "Build tests for SMASH" OFF)
0084 if (USE_SMASH)
0085 message("SMASH includes and library ...")
0086 find_package(SMASH)
0087 if(${SMASH_FOUND})
0088 include_directories(${SMASH_INCLUDE_DIR})
0089 endif(${SMASH_FOUND})
0090 endif (USE_SMASH)
0091
0092 ###############################
0093 ### Compiler & Linker Flags ###
0094 ###############################
0095 message("Compiler and Linker flags ...")
0096 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pipe -Wall -std=c++17")
0097 ## can turn off some warnings
0098 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder -Wno-unused-variable ")
0099 ## Then set the build type specific options. These will be automatically appended.
0100 set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
0101 set(CMAKE_CXX_FLAGS_RELEASE "-O3")
0102
0103 ## can turn on debugging information
0104 # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
0105
0106 ### system dependence.
0107 ### note that APPLE also defines UNIX, hence the elseif to differentiate
0108 if (APPLE)
0109 message( STATUS "Apple : " ${CMAKE_HOST_SYSTEM})
0110 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
0111 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
0112 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
0113 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-unused-but-set-variable -Wno-parentheses -fext-numeric-literals")
0114 endif()
0115
0116 ## can turn off some warnings
0117 # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field")
0118 elseif(UNIX)
0119 message( STATUS "Linux : " ${CMAKE_HOST_SYSTEM})
0120 ## can turn off some warnings
0121 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
0122 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-unused-but-set-variable -Wno-parentheses -fext-numeric-literals")
0123 endif()
0124
0125 ## Additional options
0126 # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
0127 endif()
0128
0129 message(STATUS "CXX_FLAGS = " ${CMAKE_CXX_FLAGS})
0130 #message(STATUS "LD_FLAGS = " ${CMAKE_EXE_LINKER_FLAGS})
0131
0132 ###########################
0133 # add the library path and inclusion path of trento to jetscape
0134 # Placement of this package is important.
0135 # Needs to come after CXX flags (cause it needs to pickup fPIC)
0136 # and before install options (cause it overwrites the default location)
0137 add_subdirectory(external_packages/trento/)
0138 include_directories("${CMAKE_SOURCE_DIR}/external_packages/trento/src/")
0139 ###########################
0140
0141 add_subdirectory(external_packages/googletest/)
0142 include_directories("${CMAKE_SOURCE_DIR}/external_packages/googletest/googletest/include/")
0143
0144 #############################################
0145 ### Installing Header and Library Files ###
0146 #############################################
0147 ## Run with, e.g., cmake -DCMAKE_INSTALL_PREFIX=~/tmp ..
0148 ## default directory is the build directory
0149 ## Note that trento also automatically populates a bin directory
0150 ## and we cannot disable this behavior
0151 ## Also, iSS and mpihydro install binaries in CMAKE_HOME_DIR. Sigh.
0152 ###
0153 # Install header files
0154 # default install prefix: build directory
0155 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
0156 set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}"
0157 CACHE PATH "Install path prefix, prepended onto install directories."
0158 FORCE)
0159 endif()
0160 message(STATUS "Now: install prefix is ${CMAKE_INSTALL_PREFIX}")
0161
0162 install(
0163 # source directory
0164 DIRECTORY
0165 # our source
0166 "${CMAKE_SOURCE_DIR}/src/framework/"
0167 "${CMAKE_SOURCE_DIR}/src/hadronization/"
0168 "${CMAKE_SOURCE_DIR}/src/initialstate/"
0169 "${CMAKE_SOURCE_DIR}/src/hydro/"
0170 "${CMAKE_SOURCE_DIR}/src/afterburner/"
0171 "${CMAKE_SOURCE_DIR}/src/jet/"
0172 "${CMAKE_SOURCE_DIR}/src/reader/"
0173 # external packages
0174 "${CMAKE_SOURCE_DIR}/external_packages/"
0175 "${CMAKE_SOURCE_DIR}/external_packages/ipglasma/src/"
0176 "${CMAKE_SOURCE_DIR}/external_packages/iSS/src/"
0177 "${CMAKE_SOURCE_DIR}/external_packages/hydro_from_external_file/src/"
0178 "${CMAKE_SOURCE_DIR}/external_packages/music/src/"
0179 "${CMAKE_SOURCE_DIR}/external_packages/trento/src/"
0180 "${CMAKE_SOURCE_DIR}/external_packages/clvisc_wrapper/"
0181 "${CMAKE_SOURCE_DIR}/external_packages/smash/src/"
0182 "${CMAKE_SOURCE_DIR}/external_packages/googletest/googletest/src/"
0183 DESTINATION "include" # target directory
0184 FILES_MATCHING # install only matched files
0185 PATTERN "*.h*" # select header files
0186 ## Necessary to exclude directories to prevent a whole (mostly empty) hierarchy
0187 PATTERN "gtl" EXCLUDE
0188 PATTERN "iSS" EXCLUDE
0189 PATTERN "hydro_from_external_file" EXCLUDE
0190 PATTERN "ipglasma" EXCLUDE
0191 PATTERN "music" EXCLUDE
0192 PATTERN "clvisc" EXCLUDE
0193 PATTERN "trento" EXCLUDE
0194 PATTERN "tests" EXCLUDE
0195 PATTERN "data_table" EXCLUDE
0196 PATTERN "LBT-tables" EXCLUDE
0197 PATTERN "Martini" EXCLUDE
0198 PATTERN "googletest" EXCLUDE
0199 )
0200
0201 ## We have includes of the form #include "GTL/dijkstra.h"
0202 ## which needs to be handled separately
0203 install(
0204 # source directory
0205 DIRECTORY
0206 "${CMAKE_SOURCE_DIR}/external_packages/gtl/include/"
0207 DESTINATION "include" # target directory
0208 FILES_MATCHING # install only matched files
0209 PATTERN "GTL/*.h*" # select header files
0210 ## Necessary to exclude directories to prevent a whole (mostly empty) hierarchy
0211 # PATTERN "gtl/src" EXCLUDE
0212 )
0213
0214 install(
0215 # source directory
0216 DIRECTORY
0217 "${CMAKE_SOURCE_DIR}/external_packages/clvisc_wrapper/include/"
0218 DESTINATION "include" # target directory
0219 FILES_MATCHING # install only matched files
0220 PATTERN "*.h*" # select header files
0221 ## Necessary to exclude directories to prevent a whole (mostly empty) hierarchy
0222 )
0223
0224
0225 # Install lib files
0226 install(
0227 # our libraries
0228 DIRECTORY
0229 "${PROJECT_BINARY_DIR}/src/lib/"
0230 "${PROJECT_BINARY_DIR}/lib/"
0231 # external packages
0232 "${PROJECT_BINARY_DIR}/external_packages/gtl/lib/"
0233 "${PROJECT_BINARY_DIR}/external_packages/ipglasma/src/"
0234 "${PROJECT_BINARY_DIR}/external_packages/iSS/src/"
0235 "${PROJECT_BINARY_DIR}/external_packages/music/src/"
0236 "${PROJECT_BINARY_DIR}/external_packages/trento/src/"
0237 "${PROJECT_BINARY_DIR}/external_packages/clvisc_wrapper/"
0238 DESTINATION "lib" # target directory
0239 FILES_MATCHING # install only matched files
0240 PATTERN "lib*.*" # selects .so, .a, .dylib, ...
0241 PATTERN "CMakeFiles" EXCLUDE
0242 )
0243
0244 ###########################
0245 ### Required packages ###
0246 ###########################
0247
0248 # Find and use Boost.
0249 message("Looking for Boost ...")
0250 find_package(Boost 1.50 REQUIRED COMPONENTS filesystem program_options system)
0251 Message(STATUS "Boost Include dirs : " ${Boost_INCLUDE_DIRS})
0252 ## boost needs special treatment. For reasons.
0253 include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
0254
0255 message("Looking for ZLIB ...")
0256 find_package(ZLIB REQUIRED)
0257 message(STATUS "ZLib found")
0258 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_GZIP" )
0259
0260 message("Looking for Pythia8 ...")
0261 find_package(Pythia8 REQUIRED)
0262 include_directories(${PYTHIA8_INCLUDE_DIR})
0263 Message(STATUS "Pythia8 Include dir : " ${PYTHIA8_INCLUDE_DIR})
0264
0265 message("Looking for HDF5 ...")
0266 find_package(HDF5 REQUIRED)
0267 include_directories(${HDF5_INCLUDE_DIRS})
0268 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_HDF5" )
0269 set( _hdf5_libs ${HDF5_CXX_LIB} ${HDF5_C_LIB} ${ZLIB} ${HDF5_HL_LIBRARIES})
0270 message(STATUS "HDF5 include dir and libs : ${HDF5_INCLUDE_DIRS} ${_hdf5_libs} ")
0271
0272 ###########################
0273 ### Optional packages ###
0274 ###########################
0275 unset(USE_HEPMC)
0276 message("Looking for HepMC ...")
0277 find_package(HEPMC)
0278 if (${HEPMC_FOUND})
0279 include_directories(${HEPMC_INCLUDE_DIR})
0280 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_HEPMC" )
0281 Message(STATUS "HepMC Include dir : " ${HEPMC_INCLUDE_DIR})
0282 endif()
0283
0284 option(USE_ROOT "Build using ROOT Libraries and Output" OFF)
0285 if (USE_ROOT)
0286 message("Looking for ROOT ...")
0287 #find_package(ROOT)
0288 list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
0289 find_package(ROOT)
0290 if (${ROOT_FOUND})
0291 #include_directories(${ROOT_INCLUDES})
0292 include_directories(${ROOT_INCLUDE_DIRS})
0293 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_ROOT" )
0294 Message(STATUS "ROOT Include dir : " ${ROOT_INCLUDE_DIRS})
0295 Message(STATUS "ROOT Libraries : " ${ROOT_LIBRARIES})
0296 endif()
0297 endif(USE_ROOT)
0298
0299 message("Looking for MPI ...")
0300 find_package(MPI)
0301 if(${MPI_FOUND})
0302 message(STATUS "MPI Include dir : " ${MPI_INCLUDE_PATH})
0303 include_directories(${MPI_INCLUDE_PATH})
0304 endif(${MPI_FOUND})
0305
0306 message("Looking for GSL ...")
0307 find_package(GSL)
0308 if(${GSL_FOUND})
0309 message(STATUS "GSL_INCLUDE_DIR : " ${GSL_INCLUDE_DIR} ${GSLCBLAS_INCLUDE_DIRS})
0310 include_directories(${GSL_INCLUDE_DIR} ${GSLCBLAS_INCLUDE_DIRS})
0311 endif(${GSL_FOUND})
0312
0313 ###########################
0314 ### Framework Includes ###
0315 ###########################
0316 message ("Include Directories ...")
0317 include_directories(./src/ )
0318 include_directories(./src/framework )
0319 include_directories(./src/initialstate )
0320 include_directories(./src/preequilibrium )
0321 include_directories(./src/liquefier )
0322 include_directories(./src/hydro )
0323 include_directories(./src/hadronization )
0324 include_directories(./src/afterburner )
0325 include_directories(./src/jet )
0326 include_directories(./src/reader )
0327 include_directories(./external_packages/)
0328 include_directories(./external_packages/gtl/include )
0329 include_directories(./external_packages/hydro_from_external_file )
0330 include_directories(./examples/ )
0331 if ("${ROOT_FOUND}")
0332 include_directories(./src/root)
0333 #add_subdirectory(./src/root)
0334 endif()
0335
0336 ### include_directories will be expanded as packages are found
0337
0338 ###################################################
0339 ### Some additional settings for subdirectories ###
0340 ###################################################
0341 add_subdirectory(./external_packages)
0342 add_subdirectory(./external_packages/gtl)
0343 add_subdirectory(./src)
0344
0345 if (unittests)
0346 add_subdirectory(./examples/unittests/)
0347 endif (unittests)
0348
0349 if (USE_SMASH)
0350 target_compile_definitions(JetScape PRIVATE USE_SMASH)
0351 endif (USE_SMASH)
0352
0353 if (USE_FREESTREAM)
0354 if(NOT EXISTS "${CMAKE_SOURCE_DIR}/external_packages/freestream-milne")
0355 message(FATAL_ERROR "Error: freestream-milne source has not been downloaded in external_packages by ./get_freestream-milne.sh")
0356 endif()
0357 message("Building freestream-milne ...")
0358 if (${GSL_FOUND})
0359 add_subdirectory(./external_packages/freestream-milne)
0360 else()
0361 message (FATAL_ERROR "GSL are necessary for Freestreaming" )
0362 endif()
0363 target_compile_definitions(JetScape PRIVATE USE_FREESTREAM)
0364 endif (USE_FREESTREAM)
0365
0366 if (USE_IPGlasma)
0367 if(NOT EXISTS "${CMAKE_SOURCE_DIR}/external_packages/ipglasma")
0368 message(FATAL_ERROR "Error: IPGlasma source has not been downloaded in external_packages by ./get_ipglasma.sh")
0369 endif()
0370 if (${GSL_FOUND})
0371 message("Building IPGlasma ...")
0372 add_subdirectory(./external_packages/ipglasma)
0373 else()
0374 message (FATAL_ERROR "GSL are necessary for ipglasma" )
0375 endif()
0376 target_compile_definitions(JetScape PRIVATE USE_IPGlasma)
0377 endif()
0378
0379 if (USE_MUSIC)
0380 if(NOT EXISTS "${CMAKE_SOURCE_DIR}/external_packages/music")
0381 message(FATAL_ERROR "Error: MUSIC source has not been downloaded in external_packages by ./get_music.sh")
0382 endif()
0383 if (${GSL_FOUND})
0384 message("Building MUSIC ...")
0385 add_subdirectory(./external_packages/music)
0386 else()
0387 message (FATAL_ERROR "GSL are necessary for MUSIC" )
0388 endif()
0389 target_compile_definitions(JetScape PRIVATE USE_MUSIC)
0390 endif()
0391
0392 if (USE_ISS)
0393 if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/iSS")
0394 add_subdirectory( ${CMAKE_SOURCE_DIR}/external_packages/iSS )
0395 else()
0396 message(FATAL_ERROR "Error: iSS source has not been downloaded in external_packages by ./get_iSS.sh")
0397 endif()
0398 target_compile_definitions(JetScape PRIVATE iSpectraSampler)
0399 endif (USE_ISS)
0400
0401 if (OPENCL_FOUND AND USE_CLVISC)
0402 add_subdirectory( ${CMAKE_SOURCE_DIR}/external_packages/clvisc_wrapper )
0403 endif (OPENCL_FOUND AND USE_CLVISC)
0404
0405 ###########################
0406 ### Binary location ###
0407 ###########################
0408 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
0409
0410 ##############################
0411 ### Standalone Reader lib ###
0412 ##############################
0413 FILE(GLOB LIBREADERSOURCES src/reader/*.cc)
0414 set (LIBREADERSOURCES ${LIBREADERSOURCES} )
0415 set (LIBREADERSOURCES ${LIBREADERSOURCES} src/framework/JetScapeParticles.cc )
0416 set (LIBREADERSOURCES ${LIBREADERSOURCES} src/framework/StringTokenizer.cc )
0417 set (LIBREADERSOURCES ${LIBREADERSOURCES} src/framework/JetClass.cc )
0418 set (LIBREADERSOURCES ${LIBREADERSOURCES} src/framework/JetScapeLogger.cc )
0419 set (LIBREADERSOURCES ${LIBREADERSOURCES} src/framework/PartonShower.cc )
0420
0421 add_library(JetScapeReader SHARED ${LIBREADERSOURCES})
0422 set_target_properties(JetScapeReader PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib )
0423 target_link_libraries(JetScapeReader JetScapeThird GTL ${PYTHIA8_LIBRARIES})
0424
0425 ###########################
0426 ### Executables ###
0427 ###########################
0428
0429 ### Run Jetscape
0430 add_executable(runJetscape ./examples/runJetscape.cc)
0431 target_link_libraries(runJetscape JetScape )
0432
0433 ### Read Jetscape output
0434 add_executable(readerTest ./examples/readerTest.cc)
0435 target_link_libraries(readerTest JetScape )
0436
0437 add_executable(FinalStateHadrons ./examples/FinalStateHadrons.cc)
0438 target_link_libraries(FinalStateHadrons JetScape )
0439
0440 add_executable(FinalStatePartons ./examples/FinalStatePartons.cc)
0441 target_link_libraries(FinalStatePartons JetScape )
0442
0443 # executables with additional dependencies
0444 if ( USE_IPGlasma )
0445 target_link_libraries(runJetscape ${GSL_LIBRARIES})
0446 endif (USE_IPGlasma )
0447 if ( USE_MUSIC AND USE_ISS )
0448 target_link_libraries(runJetscape ${GSL_LIBRARIES})
0449 endif (USE_MUSIC AND USE_ISS )
0450
0451 if ( USE_MUSIC AND USE_ISS AND USE_SMASH )
0452 include_directories(${SMASH_INCLUDE_DIR})
0453 # "-lubsan -lasan")
0454 target_link_libraries(runJetscape ${SMASH_LIBRARIES} ${MPI_LIBRARIES} ${GSL_LIBRARIES})
0455 endif ( USE_MUSIC AND USE_ISS AND USE_SMASH )
0456
0457 #if (${ROOT_FOUND})
0458 # add_executable(PythiaBrickTestRoot ./examples/custom_examples/PythiaBrickTestRoot.cc)
0459 # target_link_libraries(PythiaBrickTestRoot JetScape)
0460 #endif(${ROOT_FOUND})
0461
0462 # -----------------------------------------------------------
0463 #### copy essential files for MUSIC to build/
0464 if (USE_IPGlasma)
0465 if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/ipglasma/")
0466 file(COPY ${CMAKE_SOURCE_DIR}/external_packages/ipglasma/input DESTINATION ${CMAKE_BINARY_DIR}/)
0467 file(RENAME ${CMAKE_BINARY_DIR}/input ${CMAKE_BINARY_DIR}/ipglasma.input)
0468 file(COPY ${CMAKE_SOURCE_DIR}/external_packages/ipglasma/qs2Adj_vs_Tp_vs_Y_200.in DESTINATION ${CMAKE_BINARY_DIR}/)
0469 else()
0470 message(FATAL_ERROR "Error: Cannot find files for IPGlasma.")
0471 endif()
0472 endif()
0473 if (USE_FREESTREAM)
0474 if(EXISTS "${CMAKE_SOURCE_DIR}/examples/test_freestream_files/")
0475 file(COPY ./examples/test_freestream_files/freestream_input
0476 DESTINATION ${CMAKE_BINARY_DIR})
0477 else()
0478 message(FATAL_ERROR "Error: Cannot find files for freestream-milne.")
0479 endif()
0480 endif (USE_FREESTREAM)
0481 if (USE_MUSIC)
0482 if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/music/EOS/")
0483 file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/EOS)
0484 file(COPY ${CMAKE_SOURCE_DIR}/external_packages/music/EOS/
0485 DESTINATION ${CMAKE_BINARY_DIR}/EOS)
0486 file(COPY ${CMAKE_SOURCE_DIR}/examples/test_music_files/music_input
0487 DESTINATION ${CMAKE_BINARY_DIR})
0488 else()
0489 message(FATAL_ERROR "Error: Cannot find files for MUSIC.")
0490 endif()
0491 endif()
0492
0493 #### copy essential files for iSS to build/
0494 if (USE_ISS)
0495 if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/iSS/iSS_tables")
0496 file(COPY ${CMAKE_SOURCE_DIR}/external_packages/iSS/iSS_tables DESTINATION ${CMAKE_BINARY_DIR}/)
0497 file(COPY ${CMAKE_SOURCE_DIR}/external_packages/iSS/iSS_parameters.dat DESTINATION ${CMAKE_BINARY_DIR}/)
0498 else()
0499 message(FATAL_ERROR "Error: iSS tables have not been downloaded in external_packages by ./get_iSS.sh")
0500 endif()
0501 endif (USE_ISS)
0502
0503 #### copy essential files for LBT to build/
0504 if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/LBT-tables")
0505 execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/external_packages/LBT-tables ${CMAKE_BINARY_DIR}/LBT-tables)
0506 else()
0507 message("Warning: LBT-tables have not been downloaded in external_packages by ./get_lbtTab.sh; LBT-brickTest will NOT run properly.")
0508 endif()