Hi,
I have installed CMake 3.17.1, gcc 9.3.0, openmpi 3.1.5 and other tools on my Mac (10.15.4) using spack. I am able to configure and build my code with the following options
cmake ../ \
-DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_Fortran_COMPILER=gfortran
However, when I add the Xcode generator option:
cmake -G Xcode ../ \
-DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_Fortran_COMPILER=gfortran
cmake is unable to identify the compiler and gives the following errors. Is there a way to resolve this and get cmake to generate the workspace for Xcode?
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
<edited>
-- Configuring incomplete, errors occurred!