Skip to content

Commit

Permalink
apacheGH-45325: [C++] Improved error message when using clang++ witho…
Browse files Browse the repository at this point in the history
…ut clang
  • Loading branch information
WillAyd committed Jan 21, 2025
1 parent 984519d commit bd6aa35
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ include(CheckCXXSourceCompiles)

message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

set(UsingClang
CMAKE_C_COMPILER_ID
STREQUAL
"AppleClang"
OR
CMAKE_C_COMPILER_ID
STREQUAL
"Clang")
set(UsingClangPlusPlus
CMAKE_CXX_COMPILER_ID
STREQUAL
"AppleClang"
OR
CMAKE_CXX_COMPILER_ID
STREQUAL
"Clang")

if(UsingClangPlusPlus and NOT UsingClang)
error("When using clang++ you must also use clang")
endif()

if(NOT DEFINED ARROW_CPU_FLAG)
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(ARROW_CPU_FLAG "emscripten")
Expand Down

0 comments on commit bd6aa35

Please sign in to comment.