Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake IP-Glasma flag #72

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (OPENCL_FOUND)
endif (USE_CLVISC)
endif (OPENCL_FOUND)

# IPGlasma. Turn on with 'cmake -DUSE_IPGLASMA=ON'.
# IP-Glasma. Turn on with 'cmake -DUSE_IPGLASMA=ON'.
option(USE_IPGLASMA "Build with IP-Glasma" OFF)
if (USE_IPGLASMA)
message("Includes for IP-Glasma ...")
Expand Down Expand Up @@ -402,17 +402,17 @@ if (USE_3DGlauber)
endif()


if (USE_IPGlasma)
if (USE_IPGLASMA)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/external_packages/ipglasma")
message(FATAL_ERROR "Error: IPGlasma source has not been downloaded in external_packages by ./get_ipglasma.sh")
message(FATAL_ERROR "Error: IP-Glasma source has not been downloaded in external_packages by ./get_ipglasma.sh")
endif()
if (${GSL_FOUND})
message("Building IPGlasma ...")
message("Building IP-Glasma ...")
add_subdirectory(./external_packages/ipglasma)
else()
message (FATAL_ERROR "GSL are necessary for ipglasma" )
message (FATAL_ERROR "GSL is necessary for IP-Glasma" )
endif()
target_compile_definitions(JetScape PRIVATE USE_IPGlasma)
target_compile_definitions(JetScape PRIVATE USE_IPGLASMA)
endif()

if (USE_MUSIC)
Expand Down Expand Up @@ -515,9 +515,9 @@ endif (USE_SMASH )


# executables with additional dependencies
if ( USE_IPGlasma )
if ( USE_IPGLASMA )
target_link_libraries(runJetscape ${GSL_LIBRARIES})
endif (USE_IPGlasma )
endif (USE_IPGLASMA )
if ( USE_MUSIC AND USE_ISS )
target_link_libraries(runJetscape ${GSL_LIBRARIES})
endif (USE_MUSIC AND USE_ISS )
Expand All @@ -539,12 +539,12 @@ endif(USE_ROOT)
# -----------------------------------------------------------
#### copy essential files for MUSIC to build/
file(COPY ./external_packages/trento/nucleusConfigs DESTINATION ${CMAKE_BINARY_DIR}/)
if (USE_IPGlasma)
if (USE_IPGLASMA)
if(EXISTS "${CMAKE_SOURCE_DIR}/external_packages/ipglasma/")
file(COPY ${CMAKE_SOURCE_DIR}/examples/test_ipglasma_files/ipglasma.input DESTINATION ${CMAKE_BINARY_DIR}/)
file(COPY ${CMAKE_SOURCE_DIR}/external_packages/ipglasma/qs2Adj_vs_Tp_vs_Y_200.in DESTINATION ${CMAKE_BINARY_DIR}/)
else()
message(FATAL_ERROR "Error: Cannot find files for IPGlasma.")
message(FATAL_ERROR "Error: Cannot find files for IP-Glasma.")
endif()
endif()
if (USE_FREESTREAM)
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif()
FILE(GLOB initialstatesources initialstate/*.cc)
set (SOURCES ${SOURCES} ${initialstatesources} )
## Take care of options
if(NOT "${USE_IPGlasma}")
if(NOT "${USE_IPGLASMA}")
list (REMOVE_ITEM SOURCES ${CMAKE_SOURCE_DIR}/src/initialstate/IPGlasmaWrapper.cc)
endif()

Expand Down Expand Up @@ -135,7 +135,7 @@ if ( ${HEPMC_FOUND} )
endif()
endif()

if ( USE_IPGlasma)
if ( USE_IPGLASMA )
target_link_libraries (JetScape ipglasma_lib)
endif()

Expand Down
Loading