From da86d1c0bdf02cc9e4b3608e6dbdca2cc094df28 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Fri, 15 Sep 2017 11:17:40 +0200 Subject: [PATCH] Introduced mandatory call to project in top level CMakeLists.txt Somehow this was never called in the OPM modules. But the CMake documentation actually says: "The top-level ``CMakeLists.txt`` file for a project must contain a literal, direct call to the ``project()`` command; loading one through the ``include()`` command is not sufficient. If no such call exists CMake will implicitly add one to the top that enables the default languages (``C`` and ``CXX``). " Without it some variables (like CMAKE_PROJECT_NAME) are not correctly defined. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a9250e82..5a70f6f8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ # # ########################################################################### +# Mandatory call to project +project(opm-simulators CXX) + cmake_minimum_required (VERSION 2.8) set( OPM_COMMON_ROOT "" CACHE PATH "Root directory containing OPM related cmake modules")