Skip to content

Commit

Permalink
Create macro CMAKE_C_COMPILER_IS_OPENXL for openxl
Browse files Browse the repository at this point in the history
This macro will specify if openXL17 clang is used.

Signed-off-by: Ishita Ray <ishita.ray@ibm.com>
  • Loading branch information
ishitaR88 committed Oct 4, 2024
1 parent d4f0498 commit 002c25e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmake/modules/OmrDetectSystemInformation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ macro(omr_detect_system_information)
if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
# clang on Windows mimics MSVC
set(_OMR_TOOLCONFIG "msvc")
elseif(CMAKE_C_COMPILER_ID MATCHES "^Clang$")
# OpenXL17 uses CMAKE_C_COMPILER_ID "Clang" for AIX
set(_OMR_TOOLCONFIG "gnu")
set(CMAKE_C_COMPILER_IS_OPENXL TRUE CACHE BOOL "OpenXL is the C compiler")
if(CMAKE_C_COMPILER_IS_OPENXL)
set(OMR_ENV_OPENXL 1)
set(ENV{OMR_ENV_OPENXL} ${OMR_ENV_OPENXL})
else()
set(OMR_ENV_OPENXL 0)
set(ENV{OMR_ENV_OPENXL} ${OMR_ENV_OPENXL})
endif()
else()
# TODO we don't actually have a clang config
# just use GNU config
Expand Down

0 comments on commit 002c25e

Please sign in to comment.