0

I'm getting Could not find cmake module file: CMakeDetermineVersionCompiler.cmake after installing cmake via script from website. What am I missing and where/what commands to run to fix this issue.

install cmd:

sudo ./cmake.sh --prefix=/usr/local/ --exclude-subdir

CMakeLists.txt:

cmake_minimum_required(VERSION 3.12)

project(Hello Version 1.0)

add_executable(${PROJECT_NAME} ../src/main.cpp)

Version: cmake version 3.16.6 (I also tried the latest version 3.17.2 too)

OS: Linux Mint 19 Cinnamon

Mr.UNOwen
  • 163
  • 1
  • 1
  • 14

2 Answers2

5

Inside CMake commands all options have case-sensitive names, which are usually upper-case. So, it is incorrectly to write Version instead of VERSION. Correct:

project(Hello VERSION 1.0)

See documentation for project command.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
0

@Tsyvarev is correct, of course - it's Version used instead of VERSION.

I've reported this over at Kitware's issue tracker:

Feel free to chime in on that page. Hopefully they'll address this at some point (they're often responsive).

einpoklum
  • 118,144
  • 57
  • 340
  • 684