Errors running cmake

Discussion about building and installing Elmer
Gary R
Posts: 68
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Errors running cmake (Closed)

Post by Gary R » 18 Sep 2017, 09:26

Hi all,
I finally got trilinos installed and the cmake compiler got a few steps further. I have since ditched Debian for Kubuntu. I am closing out this thread. I need to create a new on and start with another error.

Gary R
Posts: 68
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Errors running cmake (CLOSED)

Post by Gary R » 19 Sep 2017, 01:07

Closing this thread.

Gary R
Posts: 68
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Errors running cmake (CLOSED)

Post by Gary R » 19 Sep 2017, 01:22

I'm closing this thread.

Gary R.

keinkeim
Posts: 1
Joined: 05 Mar 2019, 19:18
Antispam: Yes

Re: Errors running cmake

Post by keinkeim » 05 Mar 2019, 19:42

I want to stress that if you get something like:
CMake Error at cmake/Modules/AddModules.cmake:27 (ADD_LIBRARY):
No SOURCES given to target: CMakeFiles
Call Stack (most recent call first):
cmake/Modules/AddModules.cmake:64 (ADD_ELMER_MODULE)
fem/src/modules/CMakeLists.txt:5 (ADD_ELMER_MODULES)
The most probable cause is that you have executed "cmake" within the source directory, and not in a separate directory for the build.

That is, you have a directory tree that looks like this:

../elmer/elmerfem/ -> If you run cmake from here, then you'll get those errors, even if you later switch to build
../elmer/build/ -> the build system is supposed to be run from within here: "cmake .......... ../elmerfem"
../elmer/install/ -> Most probably you passed "-DCMAKE_INSTALL_PREFIX=../install" to cmake - Elmer will be installed here.


Solution [A]

Enter the source directory (elmerfem)
  • Option 1:
    Find all the untracked files (git ls-files --other --directory --exclude-standard) and delete them
  • Option 2:
    Be careful! the following command will discard your changes to the sources! use git checkout with parameter -f
  • Option 3:
    Search for the "CMakeFiles" sub-directories and delete them
Then, go to the build directory and run cmake.

Post Reply