leetmaa / KMCLib

A kinetic Monte Carlo Python/C++ library.
GNU General Public License v3.0
119 stars 49 forks source link

[Compilation on macOS] Unidentified CXX compiler version #24

Open alchem0x2A opened 4 years ago

alchem0x2A commented 4 years ago

I would like to report some testings on macOS. Following the installation guides to install KMCLib via clang + MPI on macOS 10.15 throws unsupported compiler error.

Steps to reproduce

CC=clang CXX="clang++ -stdlib=libc++" cmake -DMPI=mpicxx ..
CMake Error at CMakeLists.txt:103 (message):
  Invalid CXX compiler.  Only g++, Intel and Clang supported

Possible causes

The newest version of open-mpi based on clang is recognized as System CXX compiler with MPI wrapping by CMake, which makes the rules in CMakeLists invalid.

Possible solutions

Update CMakeLists.txt so that when user puts CXX=mpicxx it can automatically recognise the MPI option.