cmake: call cmake_minimum_required() before project()

When configuring with cmake 3.26.2 I saw the following error:

  CMake Warning (dev) at CMakeLists.txt:1 (project):
    cmake_minimum_required() should be called prior to this top-level project()
    call.  Please see the cmake-commands(7) manual for usage documentation of
    both commands.
  This warning is for project developers.  Use -Wno-dev to suppress it.

Indeed, manual to cmake_minimum_required [1] specifies that

> Call the cmake_minimum_required() command at the beginning of the
> top-level CMakeLists.txt file even before calling the project()
> command. It is important to establish version and policy settings
> before invoking other commands whose behavior they may affect.
> See also policy CMP0000.

[1] https://cmake.org/cmake/help/v3.26/command/cmake_minimum_required.html

Change-Id: I34a205aab4c6937c672e2b43f85b63a2c7810d9d
1 file changed
tree: d99b5f3a0f9f2b16f6c894099b44604c8686f5c3
  1. .clang-format
  2. .gitmodules
  3. .zuul.yaml
  4. CMakeLists.txt
  5. Doxyfile.in
  6. LICENSE
  7. README.md
  8. ci/
  9. cmake/
  10. docs/
  11. src/
  12. tests/
README.md

Console interface to NETCONF servers

License Gerrit Zuul CI taiga.io

This program provides an interactive console for working with YANG data. It can connect to NETCONF servers, work as a standalone YANG data editor, or talk to sysrepo locally.

Installation

For building, one needs:

The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install.

Bug Reporting

Issue reporting and feature requests are welcome via Taiga.io.

Development

We are using Gerrit for patch submission, code review and Continuous Integration (CI). A quick introduction is recommended for first-time Gerrit users. Choose CESNET - Sign in with GitHub for login. Development roadmap and planning happens over Taiga.io.

Credits

Copyright © CESNET, https://www.cesnet.cz/ . Portions copyright © Faculty of Information Technology, Czech Technical University in Prague, https://fit.cvut.cz/ . Most of the code was written by Václav Kubernát (CESNET, formerly FIT ČVUT) and Jan Kundrát (CESNET). The project is distributed under the terms of the Apache 2.0 license.