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 5d9c8350a2
commit da86d1c0bd

View File

@@ -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")