Skip to content

Commit e4d3df6

Browse files
committed
Fix gcc compilation + link Chrono 9.0.1 for demos
1 parent 98168e5 commit e4d3df6

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ set_target_properties(HydroChrono
228228
229229
target_link_libraries(HydroChrono
230230
PUBLIC
231+
${CHRONO_LIBRARIES}
231232
${CHRONO_TARGETS} # Chrono::Chrono_core;Chrono::Chrono_irrlicht;...
232233
$<$<TARGET_EXISTS:Eigen3::Eigen>:Eigen3::Eigen>
233234
PRIVATE
@@ -366,4 +367,8 @@ export(
366367
)
367368
368369
# Set build type to Release but enable debug symbols
369-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /O2")
370+
if(MSVC)
371+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /O2")
372+
else()
373+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -O2")
374+
endif()

include/hydroc/logging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <cstdlib>
2828
#include <string>
2929
#include <sstream>
30+
#include <algorithm>
3031

3132
#ifdef _WIN32
3233
#include <windows.h>

0 commit comments

Comments
 (0)