Closed rquey closed 2 years ago
Thank you for the raising the issue and checking all this. I'm thinking of includind Cmocka for testing, and that requires CMake 3.5. So, I may not be able to downgrade that, but all the rest I'll get it fixed. Thank you!
Finally closed in #24
On a CentOS 7 system, several compilation issues arise, as detailed below. I am providing fixes here rather than in a commit as I am not sure they are the best.
The top-level
CMakeLists.txt
requires CMake version 3.5 or higher. My CMake is 2.8. Changing the version line tocmake_minimum_required(VERSION 2.8)
does the trick, so the version requirement could be set to 2.8 for greater system compatibility.Compilation generates several errors such as
openGJK/lib/src/openGJK.c:74:3: error: ‘for’ loop initial declarations are only allowed in C99 mode.
. This can be fixed by addingset(CMAKE_C_FLAGS "-std=gnu99")
toopenGJK/lib/CMakeLists.txt
.Compilation finally generates the following error:
This can be fixed by linking against the math library in
openGJK/lib/example1_c/CMakeLists.txt
, but changing the linking directive totarget_link_libraries(demo openGJKlib "-lm")
.