cmake_minimum_required

881 views
Skip to first unread message

Felix Felix

unread,
Jul 30, 2022, 6:32:15 AM7/30/22
to deal.II User Group
Hi,

I am currently still learning how to use dealii libraries.
Just recently I was trying to use step-4 examples.

so i did the usual by inputing: " cmake . " within the directory.

What happened was I received this:
"CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.16)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/felixelf/dealdottwo/dealii/examples/step-4 "

and then when I key in " make " nothing seems to happen.
Would someone kindly guide me to what I am supposed to do here?
I am not very familiar with cmake myself so I'm learning by doing everything at the moment.

Kind regards,
Felix

Matthias Maier

unread,
Jul 30, 2022, 7:40:57 AM7/30/22
to dea...@googlegroups.com
Did you accidentally run "cmake ." in "examples/" instead of
"examples/step-4"?

Best,
Matthias



On Sat, Jul 30, 2022, at 05:32 CDT, Felix Felix <felix...@gmail.com> wrote:

> Hi,
>
> I am currently still learning how to use dealii libraries.
> Just recently I was trying to use step-4 examples.
>
> so i did the usual by inputing: " cmake . " within the directory.
>
> What happened was I received this:
> "
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *CMake Warning (dev) in CMakeLists.txt: No project() command is present.
> The top-level CMakeLists.txt file must contain a literal, direct call to
> the project() command. Add a line of code such as
> project(ProjectName) near the top of the file, but after
> cmake_minimum_required(). CMake is pretending there is a
> "project(Project)" command on the first line.This warning is for project
> developers. Use -Wno-dev to suppress it.CMake Warning (dev) in
> CMakeLists.txt: No cmake_minimum_required command is present. A line of
> code such as cmake_minimum_required(VERSION 3.16) should be added at
> the top of the file. The version specified may be lower if you wish to
> support older CMake versions for this project. For more information run
> "cmake --help-policy CMP0000".This warning is for project developers. Use
> -Wno-dev to suppress it.-- Configuring done-- Generating done-- Build files
> have been written to: /home/felixelf/dealdottwo/dealii/examples/step-4 "*

Felix Felix

unread,
Jul 30, 2022, 10:39:43 AM7/30/22
to deal.II User Group
No I did not,

I ran cmake -DDEAL_II_DIR=/home/.../dealii/build/ .
Reply all
Reply to author
Forward
0 new messages