Commit f5921c82 authored by LUX Benjamin's avatar LUX Benjamin

Modify `CMakeLists.txt` to suppress an error the first time I run `ccmake ..`...

Modify `CMakeLists.txt` to suppress an error the first time I run `ccmake ..` on a new directory `/build`
Bug encounter with `ccmake version 3.10.1`
parent efd0247e
......@@ -225,7 +225,6 @@ endif ()
# MPI
set(MPI_COMPILER mpicc)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
if (MPI_C_LIBRARIES)
......@@ -233,6 +232,7 @@ if (MPI_C_LIBRARIES)
else ()
list (APPEND PAMPA_DEPENDENCIES ${MPI_LIBRARIES} m)
endif ()
set(MPI_COMPILER mpicc)
if (PAMPA_BUILD_ALONE)
include_directories(${PAMPA_SOURCE_DIR}/include)
......
  • The error message show by ccmake .. is :

     CMake Error at /home/benjamin/Codes/Spack/spack/opt/spack/linux-ubuntu14.04-x86_64/gcc-4.8/cmake-3.10.1-x3hl57prtxhkacghu46kngvyy2vxri4b/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137
     (message):
       Could NOT find MPI (missing: MPI_CXX_FOUND) (found version "3.1")
     Call Stack (most recent call first):
       /home/benjamin/Codes/Spack/spack/opt/spack/linux-ubuntu14.04-x86_64/gcc-4.8/cmake-3.10.1-x3hl57prtxhkacghu46kngvyy2vxri4b/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378
     (_FPHSA_FAILURE_MESSAGE)
       /home/benjamin/Codes/Spack/spack/opt/spack/linux-ubuntu14.04-x86_64/gcc-4.8/cmake-3.10.1-x3hl57prtxhkacghu46kngvyy2vxri4b/share/cmake-3.10/Modules/FindMPI.cmake:1444 (find_package_handle_standard_args)
       CMakeLists.txt:229 (find_package)

    After the first ccmake .. run I don't get the error.

    After the patch MPI is correctly found for the first time ccmake .. is run.

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment