CMake Anfänger
-
ok es ist nicht ganz so schlimm
im prinzip muss es einmal -lrt und einem -lg2c hinten sein für die libs - wie ich das wohl herausfinde...
-
ALso für lapack habe ich folgendes find-makro gefunden das ziemlich lang ist.
Ich weiß allerdings nicht wie ich die makro-funktion in meiner CMakeLists.txt verwenden soll. Kann mir jemand dabei helfen? Da steht als Makro-definition:macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas) # This macro checks for the existence of the combination of fortran libraries # given by _list. If the combination is found, this macro checks (using the # Check_Fortran_Function_Exists macro) whether can link against that library # combination using the name of a routine given by _name using the linker # flags given by _flags. If the combination of libraries is found and passes # the link test, LIBRARIES is set to the list of complete library paths that # have been found. Otherwise, LIBRARIES is set to FALSE. # N.B. _prefix is the prefix applied to the names of all cached variables that # are generated internally and marked advanced by this macro.
das gesamte file ist hier zu finden.
http://www.cmake.org/pipermail/cmake/2007-August/016023.html
-
wie bereits erwähnt kommt CMake mit einer Vielzahl an vorgefertigten Find-Makros. u.a. ist schon seit Ewigkeiten das "FindLAPACK.cmake" dabei.
schau mal unterCMake 2.6\share\cmake-2.6\Modules
Eingebunden werden diese mit FIND_PACKAGE.--> www.gidf.de
-
vielen dank - aber wo bitte soll ich schauen? Ich arbeite unter Linux. Ich suche gerade online eine Variante. Danke Dir für Deinen Tipp.
-
ah - jetzt hab ichs begriffen
Danke nochmals
-
Also ich versteh das nicht. Ich versuche das mit der lapack library jetzt so:
Ich habe einen Ordner cmake/Modules in meinem root-dir erstellt wo auch bin/ und src/ liegen.
Dann habe ich in den Modules-Ordner die FindLAPACK.cmake gelegt.
Gleichzeitig habe ich meine CmakeLists.txt so angepasst:FIND_PACKAGE(LAPACK)
und dann schreit cmake so:
CMake Error: LAPACK_DIR is not set. It must be set to the directory containing LAPACKConfig.cmake in order to use LAPACK.
Aber wenn ich in der CMakeLists.txt jetzt schreibe SET(LAPACK_DIR "../cmake/Modules") oder auch SET(LAPACK_DIR "cmake/Modules") dann schreit er:
CMake Error: Error in cmake code at /home/<ich>/tmp/prog/cmake/Modules/LAPACKConfig.cmake:25: Unknown CMake command "get_property".
Was heißt das jetzt?
-
Hab jetzt cmake2.6.2 nachgezogen - damit funktionierts jetzt -zumindest kommt die fehlermeldung nicht mehr. hatte davor cmake 2.4
-
Also beim cmake sucht er bei mir jetzt lapack ab anscheinend aber er findet es nicht obwohl es da ist. Mit meinen eigenen Makefile-Befehlen klappts ja auch.
Nur er schreit mit
Looking for LAPACK... - NOT found (Fortran not enabled)
warum? und wie kann ich das beseitigen?
-
wenn ich mein eigenes find_library() in meinem CmakeLists.txt habe dann findet er zumindest ein liblapack.a aber wenn ich das FindLAPACK.cmake benutze über den normalen Aufruf im CmakeLists.txt mit FIND_PACKAGE(LAPACK) klappts nicht. wo liegt das Problem?
-
hmm.. also keine ahnung.. lies dir mal die beschreibung im findLapak modul durch. andernfalls, schreib einfach eine emails an die Cmake-E-Mail-List