File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,11 +147,27 @@ endif()
147147
148148# Now we can find Chrono (which assumes Irrlicht::Irrlicht already exists)
149149find_package (Chrono CONFIG REQUIRED )
150+ message (STATUS "Chrono core targets: ${Chrono_LIBRARIES} " )
151+
152+ if (EXISTS "${Chrono_DIR} /ChronoTargets.cmake" )
153+ include ("${Chrono_DIR} /ChronoTargets.cmake" )
154+ message (STATUS "Manually included ChronoTargets.cmake from ${Chrono_DIR} " )
155+ endif ()
156+
150157
151158# Verify required Chrono targets are available
152159if (NOT TARGET Chrono::Chrono_core)
153160 message (FATAL_ERROR "Chrono::Chrono_core target not found. Ensure Chrono was built with modern CMake target exports." )
154161endif ()
162+ # Find OpenMP first to ensure OpenMP::OpenMP_CXX is available
163+ find_package (OpenMP REQUIRED )
164+
165+ if (OpenMP_CXX_FOUND)
166+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} " )
167+ endif ()
168+
169+ # Then include Chrono
170+ find_package (Chrono REQUIRED PATHS /usr/local/lib/cmake/Chrono )
155171
156172# Enable Irrlicht support if requested and available
157173if (HYDROCHRONO_ENABLE_IRRLICHT)
@@ -209,8 +225,6 @@ if (NOT HC_CHRONO_INCLUDE_DIRS AND DEFINED Chrono_DIR)
209225endif ()
210226
211227
212-
213-
214228#-----------------------------------------------------------------------------
215229# Fix for VS 2017 15.8 and newer to handle alignment specification with Eigen
216230#-----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments