From 2c48715d47482a675e01b48c1baf3ff01bbd411e Mon Sep 17 00:00:00 2001 From: GhostlyDark <31742919+GhostlyDark@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:18:08 +0200 Subject: [PATCH] Fix building with Apple Clang --- src/CMakeLists.txt | 2 +- src/GLideNHQ/CMakeLists.txt | 2 +- src/osal/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a49783cca..ac3c2b90f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -522,7 +522,7 @@ else(EGL) endif(NOT OPENGL_FOUND) endif(EGL) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") #check for compiler version execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE G++_VERSION) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND G++_VERSION VERSION_LESS 4.8) diff --git a/src/GLideNHQ/CMakeLists.txt b/src/GLideNHQ/CMakeLists.txt index 8cf332763..a06928ff2 100644 --- a/src/GLideNHQ/CMakeLists.txt +++ b/src/GLideNHQ/CMakeLists.txt @@ -65,7 +65,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_definitions( -D__MSC__) endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") SET(GCC_CPP11_COMPILE_FLAGS "-std=c++0x -Wno-unused-result") if ( NOT MINGW ) SET ( PIC_FLAGS "-fPIC" ) diff --git a/src/osal/CMakeLists.txt b/src/osal/CMakeLists.txt index c0e600c75..333136b22 100644 --- a/src/osal/CMakeLists.txt +++ b/src/osal/CMakeLists.txt @@ -39,7 +39,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_definitions( -D__MSC__) endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") SET(GCC_CPP11_COMPILE_FLAGS "-std=c++0x") if (NOT MINGW) SET( PIC_FLAGS "-fPIC")