Cmake errors while compiling

Hi, I’m trying to compile SWI (clone from Github), but i get the following errors:

CMake Error at packages/odbc/cmake/FindODBC.cmake:120 (separate_arguments):
  separate_arguments given unknown argument NATIVE_COMMAND
Call Stack (most recent call first):
  packages/odbc/CMakeLists.txt:6 (find_package)


CMake Error at packages/odbc/cmake/FindODBC.cmake:129 (separate_arguments):
  separate_arguments given unknown argument NATIVE_COMMAND
Call Stack (most recent call first):
  packages/odbc/CMakeLists.txt:6 (find_package)

My cmake version is 3.5.1

A bit of searching shows NATIVE_COMMAND was added in CMake 3.9 which was released in 2017. If someone writes a patch to support older CMake versions and it doesn’t get too ugly I’m happy to apply it. Other solutions are to drop ODBC or upgrade CMake. It is fairly easy to install CMake from the binaries they provide.

Ok. However, it could be useful to add a minimum cmake requirement in the cmake file

If nobody offers a backport (soon), I’ll do so :slight_smile:

1 Like