pisa-engine / pisa

PISA: Performant Indexes and Search for Academia
https://pisa-engine.github.io/pisa/book
Apache License 2.0
932 stars 64 forks source link

Update CMakeLists.txt #583

Closed lgrz closed 5 months ago

lgrz commented 5 months ago

Update the cmake_minimum_required version to 3.16.9. The submodule external/benchmark requires 3.16.3, so we bump the main repo to require the last patch version from 3.16.x.

lgrz commented 5 months ago

Below is a log of cmake invocations using different versions until cmake .. completed successfuly to show how we got to requiring 3.16.9.

$ cmake ..
CMake Error at CMakeLists.txt:2 (cmake_policy):
  Policy "CMP0074" is not known to this version of CMake.

CMake Error at CMakeLists.txt:17 (add_compile_definitions):
  Unknown CMake command "add_compile_definitions".

-- Configuring incomplete, errors occurred!
$ cmake --version
cmake version 3.10.2

Seem that add_compile_definitions was added in 3.12, so trying with 3.12.4 ...

CMake Error at external/benchmark/CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.16.3 or higher is required.  You are running version 3.12.4

-- Configuring incomplete, errors occurred!

Ok, external/benchmark requires 3.16.3, so trying with 3.16.9...

-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /xxx/pisa/build
$

And, here's a list of current required versions from external for reference... (they have been sort/uniq'd)

cmake_minimum_required(VERSION 2.4.4)
cmake_minimum_required(VERSION 2.6.2)
cmake_minimum_required(VERSION 2.6.4)
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required (VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required( VERSION 3.0 )
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required( VERSION 3.10 )
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.10...3.21)
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.1.3)
    cmake_minimum_required(VERSION 3.1...3.18)
cmake_minimum_required(VERSION 3.1...3.18)
cmake_minimum_required (VERSION 3.16.3)
cmake_minimum_required(VERSION 3.2.0)
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.4.3)
cmake_minimum_required( VERSION 3.5 )
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required (VERSION 3.5.1)
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.9)
elshize commented 5 months ago

Thanks @lgrz Merged!