C/C++ and Fortran

C/C++ and Fortran

Connect, learn, share, and engage with IBM Power.

 View Only

Misidentification by CMake of XLC as Clang - upgrade to CMake 3.11

By Archive User posted Fri August 31, 2018 02:01 PM

  

Originally posted by: Nicole Trudeau


When compiling with XLC for Linux 13.1.6 and up, you may have noticed strange output from CMake identifying it as Clang, for example:

-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
...
-- CMAKE_CXX_COMPILER_ID Clang

You may have also noticed strange behaviour in your program if you have conditionals checking if CMAKE_CXX_COMPILER_ID STREQUAL/MATCHES XL or Clang.

CMake has fixed the issue in CMake v3.11.0-rc3 (released Mar 9, 2018) and later - please upgrade CMake if you notice this behaviour.

If you use Summit, the OLCF admins made CMake 3.11.3 available on both summit and summitdev, so there should not be any issues there.

 

 

Related:

0 comments
17 views

Permalink