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.
This commit is contained in:
Markus Blatt 2017-09-15 11:17:40 +02:00
parent c98683e31e
commit d3b7f24abb

View File

@ -13,6 +13,9 @@
# cmake/Modules/${project}-prereqs.cmake Dependencies #
# #
###########################################################################
# Mandatory call to project
project(opm-core C CXX)
cmake_minimum_required (VERSION 2.8)