[petsc-users] Trouble finding PETSc with cmake
Jed Brown
jed at jedbrown.org
Fri Feb 27 12:05:02 CST 2015
Alice Raeli <alice.raeli at math.u-bordeaux1.fr> writes:
> Hi all,
>
> i’m trying to build my project using cmake.
> PETSc is already installed and its tests runned but when I try cmake .. for my project it appears that it doesn’t find PETSc. The error message is:
CMake insists on sequestering all the useful information in
CMakeFiles/CMakeError.log and CMakeFiles/CMakeOutput.log. Can you check
those files for details about the error? Send the output here if it
doesn't make sense to you.
> cmake module path /Users/Alice/Documents/Work/Programmazione/TEST_AUTOMATIZZAZIONE/ParallelOrder/Penalizzazione/cmake-modules
> dir /usr/local/petsc arch arch-darwin-c-debug
> CMake Warning (dev) at cmake-modules/FindPackageMultipass.cmake:48 (if):
> Policy CMP0054 is not set: Only interpret if() arguments as variables or
> keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
>
> Quoted variables like "/usr/local/petsc" will no longer be dereferenced
> when the policy is set to NEW. Since the policy is not set the OLD
> behavior will be used.
> Call Stack (most recent call first):
> cmake-modules/FindPETSc.cmake:108 (find_package_multipass)
> test/CMakeLists.txt:8 (FIND_PACKAGE)
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Error at /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
> PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
> (missing: PETSC_EXECUTABLE_RUNS)
> Call Stack (most recent call first):
> /usr/local/homebrew/Cellar/cmake/3.1.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
> cmake-modules/FindPETSc.cmake:323 (find_package_handle_standard_args)
> test/CMakeLists.txt:8 (FIND_PACKAGE)
>
> ______________
>
> PETSC_DIR and PETSC_ARCH are:
> /usr/local/petsc/
> arch-darwin-c-debug
>
> but also following the given instruction it seems not reading the correct path.
>
> I work on OS X Yosemite 10.10.2
>
> cmake version 3.1.3
>
>
> CmakeLists.txt […]
> SET(CMAKE_C_COMPILER mpicc)
>
> SET(CMAKE_CXX_COMPILER mpicxx)
>
> SET (CMAKE_C_FLAGS_INIT "-Wall -std=c99")
> SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
> SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
> SET (CMAKE_C_FLAGS_RELEASE_INIT "-O4 -DNDEBUG")
> SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
>
> SET (CMAKE_CXX_FLAGS_INIT "-Wall")
> SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
> SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
> SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O4 -DNDEBUG")
> SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
>
> […]
>
> Have you got a solution?
>
> Thanks,
> Alice
>
> Alice Raeli
> alice.raeli at math.u-bordeaux1.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150227/af7c1eb3/attachment.pgp>
More information about the petsc-users
mailing list