Install CMake on Mint

Oh, yes. I got your point.

I will try to inform the arguments.

Thank you, for now.

Wilmar.

Hi. I’m here again!

I create the CMakeLists.txt:

I create the CMakeLists.txt:

CMake script

Set the name of the project and target:

SET(TARGET “main”)

Declare all source files the target consists of:

SET(TARGET_SRC
${TARGET}.cc
)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
PROJECT(${TARGET})

After that I put the command:

administrador@administrador-desktop:~/cpp$ cmake CMakeLists.txt
– The C compiler identification is GNU 7.3.0
– The CXX compiler identification is unknown
– Check for working C compiler: /usr/bin/cc
Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake-3.17/Modules/CMakeTestCCompiler.cmake:60 (message):

The C compiler is in the “/usr/bin/cc”, but is not able to compile a simple test program.

I confirm that cc is in the /usr/bin:

administrador@administrador-desktop:/usr/bin$ ls -lag cc
lrwxrwxrwx 1 root 20 set 9 2018 cc -> /etc/alternatives/cc

I didn’t understand why it was listed on /etc/alternatives directory. I have to put this on PATH?

I finish cmake instalation. The problem is that the 2 GByte PC RAM is insufficient to run Finite Element Analise. I turn to another PC, with 4 GByte.

O though that I manage to install once, repeat will be ease! I was wrong!

New dual boot: Window 10 and Linux Mint 19.3
Download from cmake official site: cmake-3.17.2.tar.gz
Unpack command: tar -zxvf cmake-3.17.2.tar.gz
Change directory: cd cmake-3.17.2
Comand dpkg:
wilmar@wilmar-G31M-ES2C:~$ dpkg -L cmake
/.
/usr
/usr/bin
/usr/bin/cmake
/usr/bin/cpack
/usr/bin/ctest
/usr/share
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/cmake
/usr/share/bash-completion/completions/cpack
/usr/share/bash-completion/completions/ctest
/usr/share/doc
/usr/share/doc/cmake
/usr/share/doc/cmake/NEWS.Debian.gz
/usr/share/doc/cmake/changelog.Debian.gz
/usr/share/doc/cmake/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/cmake.1.gz
/usr/share/man/man1/cpack.1.gz
/usr/share/man/man1/ctest.1.gz

Source code foo.cpp and CMakeLists.txt on directory fontes:
wilmar@wilmar-G31M-ES2C:~/fontes$ ls -lag
total 32
drwxr-xr-x 3 wilmar 4096 May 10 23:15 .
drwxr-xr-x 19 wilmar 4096 May 10 23:18 …
-rw-r–r-- 1 wilmar 11047 May 10 23:01 CMakeCache.txt
drwxr-xr-x 4 wilmar 4096 May 10 23:01 CMakeFiles
-rw-r–r-- 1 wilmar 100 May 10 23:00 CMakeLists.txt
-rw-r–r-- 1 wilmar 140 May 10 18:48 foo.cpp

wilmar@wilmar-G31M-ES2C:~/fontes$ cmake CMakeLists.txt
– The C compiler identification is GNU 7.4.0
– The CXX compiler identification is unknown
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

"/usr/bin/cc"

is not able to compile a simple test program.

Compiler is on /usr/bin:
wilmar@wilmar-G31M-ES2C:/usr/bin$ ls -lag cc*
lrwxrwxrwx 1 root 20 May 5 14:04 cc -> /etc/alternatives/cc

I proceead to cancel directory cmake-3.17.2 and do everything again, but didn’t function!
It was ok for:
wilmar@wilmar-G31M-ES2C:~$ sudo apt-add-repository 'deb bionic main’

but was bad for:
wilmar@wilmar-G31M-ES2C:~$ sudo apt-get update
.
.
.
E: The repository ‘https://apt.kitware.com/ubuntu bionic-rc InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https…
.
.
.
E: The repository ‘https://apt.kitware.com/ubuntu bionic InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Maybe I did many errors!

Craig or Kyle Edwards, or others could help a desperate student?

P.S.: I need to proceed with the Deal.ii too. A long journey to get there…