KMCLib icon indicating copy to clipboard operation
KMCLib copied to clipboard

[Compilation on macOS] Unidentified CXX compiler version

Open alchem0x2A opened this issue 4 years ago • 0 comments

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

  • System: macOS 10.15, AppleClang 11.0 (Clang 3.9)
  • MPI version: open-mpi 4.0.3 based on clang-3.9 (distributed via Homebrew) -Running command under the c++/build directory:
CC=clang CXX="clang++ -stdlib=libc++" cmake -DMPI=mpicxx ..
  • Error message:
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.

alchem0x2A avatar Apr 27 '20 09:04 alchem0x2A