https://github.com/rs1909/knut/tree/master/knut
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lquadmath
Please read knut/knut/knut.spec.cmake → Buildrequires: libgfortran-static .... i.e. libgfortran.a
Probably the same for -lquadmath : libquadmath.a
( I get no errors with the cmake configuring : The Makefile is created.)
EDIT 1, 23 June : The above appears to be a configuring example only : The Makefile was created.
Build example(s) : PCLinuxOS 2016, CentOS 7, Fedora 24 are failing with Qt5 errors.
- Debian 8 Jessie : No issues, except for a cmake generated syntax error in
knut/knut/build/src/config.h
. $ make
and # make install
are OK.
The gfortran, g++ are version 4.9.2 . "libgfortran-4.9-dev" provides libgfortran.a, libquadmath.a
EDIT 2, June 23 : A build with Ubuntu 16.04 ... to try out a later compiler, gcc-5.3.1 ...
cd knut/knut/build/ && CC=gcc-5 CXX=g++-5 FC=gfortran-5 cmake .. && make && sudo make install
EDIT 3 : Testing knut with gcc/g++/gfortran version 6.1.1 → Debian 9 Stretch.
CC=gcc-6 CXX=g++-6 FC=gfortran-6 cmake .. && make ; # make install
EDIT 4 : Build requirements .. # apt-get install g++ libopenblas-dev libqt5svg5-dev
The conclusion I can have from all the above is that the used Qt5 must fit. May be there's difference in the Qt5 configuration ? patching ? ... I don't find any important difference in the Qt5 file locations.
knut
Best Answer
The CMake command
cmake_policy()
is documented in the CMake documentation.It is usually added to the
CMakeLists.txt
file of the project to change the behaviour of CMake itself, usually to be able to handle olderCMakeLists.txt
features with newer versions of CMake.You may use it to set an individual policy using
where
<NNNN>
is a CMake policy number and whereOLD
indicates that you want the "old behaviour" of this policy (the wordOLD
could also beNEW
).Or, you may use the command to set policies for compatibility with a particular version of CMake using
where
x.xx
must be at least2.4
.In either case, the
CMakeLists.txt
file of the project is modified, andcmake
will have to be re-run.See also the documentation for
cmake_minimum_required()
.