2017-03-14 10 views
0

Ich habe versucht, ein Projekt zu erstellen, das PETSc verwendet. Dazu habe ich die cmake Module von https://github.com/jedbrown/cmake-modules heruntergeladen. Als ich versuchte, das Projekt zu erstellen, bekam ich folgende Fehlermeldungen:Ich kann petsc nicht mit cmake verwenden

(...) 

-- petsc_lib_dir /cygdrive/d/Git-Projects/build_libs/INSTALL/petsc-3.7.5/lib 
-- Recognized PETSc install with single library for all packages 
-- Performing Test MULTIPASS_TEST_1_petsc_works_minimal 
-- Performing Test MULTIPASS_TEST_1_petsc_works_minimal - Failed 
-- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes 
-- Performing Test MULTIPASS_TEST_2_petsc_works_allincludes - Failed 
-- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries 
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. 
Please set them or make sure they are set and tested correctly in the CMake files: 
PETSC_LIBRARY_SINGLE 
    linked by target "cmTC_bb78d" in directory /cygdrive/d/Git-Projects/EFVLib_dev/EFVLib/_build/CMakeFiles/CMakeTmp 

CMake Error: Internal CMake error, TryCompile configure of cmake failed 
-- Performing Test MULTIPASS_TEST_3_petsc_works_alllibraries - Failed 
-- Performing Test MULTIPASS_TEST_4_petsc_works_all 
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. 
Please set them or make sure they are set and tested correctly in the CMake files: 
PETSC_LIBRARY_SINGLE 
    linked by target "cmTC_9aa2b" in directory /cygdrive/d/Git-Projects/EFVLib_dev/EFVLib/_build/CMakeFiles/CMakeTmp 

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. 
Please set them or make sure they are set and tested correctly in the CMake files: 
PETSC_LIBRARY_SINGLE (ADVANCED) 

Ich habe heruntergeladen openmpi (Cygwin-Pakete) und baute PETSc mit:

"prefix =" where_petsc_will_be_installed“- mit-sprach = C - mit-mpi - mit-cc = mpicc - mit-cxx = 0 - mit-fc = 0 --download-f2cblaslapack - mit-debugging = ja "

und die Pfade wurden exportiert mit:

export PETSC_DIR="where_petsc_is_installed" 
export PETSC_ARCH="" 
export PATH=${PATH}:${PETSC_DIR}/lib:${PETSC_DIR}/bin 

Warum habe ich diese Fehler bekommen und wie löse ich sie?

Antwort

0

Um petsc mit cmake in cygwin zu verwenden, muss es mit "--with-shared-libraries = 0" erstellt werden, Sie müssen statische Bibliotheken verwenden.

Verwandte Themen