Skip to content

Commit

Permalink
* change MULLE_C_COMPILER_ID, which is now simplified and all uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
mulle-nat committed Nov 20, 2024
1 parent 5d8a39e commit a4621e8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
5 changes: 5 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.18.0

* minor bugfix and updates such as version increments


### 0.17.1

* Various small improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,43 @@ if( NOT __COMPILER_DETECTION_C_CMAKE__)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

#
# for windows want a MSVC prefix
#
# CMAKE_C_COMPILER_ID, doesn't detect mulle-clang necessarily, so fallback
# on -DCMAKE_C_COMPILER
#
if( NOT MULLE_C_COMPILER_ID)
if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_C_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
set( MULLE_C_COMPILER_ID "MSVC-${CMAKE_C_COMPILER_ID}")
string( TOUPPER "${CMAKE_C_COMPILER_ID}" TMP_NAME)
string( REGEX REPLACE "[^A-Za-z0-9]" "" TMP_NAME "${TMP_NAME}")
if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${TMP_NAME}" MATCHES "CLANG") )
set( MULLE_C_COMPILER_ID "MSVC-${TMP_NAME}")
else()
set( MULLE_C_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
get_filename_component( TMP_NAME2 "${CMAKE_C_COMPILER}" NAME_WE)
string( TOUPPER "${TMP_NAME2}" TMP_NAME2)
string( REGEX REPLACE "[^A-Za-z0-9]" "" TMP_NAME2 "${TMP_NAME2}")
if( "${TMP_NAME2}" MATCHES "MULLECLANG")
set( MULLE_C_COMPILER_ID "${TMP_NAME2}")
else()
set( MULLE_C_COMPILER_ID "${TMP_NAME}")
endif()
endif()
endif()

if( NOT MULLE_CXX_COMPILER_ID)
if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Clang|MulleClang)$") )
set( MULLE_CXX_COMPILER_ID "MSVC-${CMAKE_CXX_COMPILER_ID}")
string( TOUPPER "${CMAKE_CXX_COMPILER_ID}" TMP_NAME)
string( REGEX REPLACE "[^A-Za-z0-9]" "" TMP_NAME "${TMP_NAME}")
if( ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ( "${TMP_NAME}" MATCHES "CLANG") )
set( MULLE_CXX_COMPILER_ID "MSVC-${TMP_NAME}")
else()
set( MULLE_CXX_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
get_filename_component( TMP_NAME2 "${CMAKE_CXX_COMPILER}" NAME_WE)
string( TOUPPER "${TMP_NAME2}" TMP_NAME2)
string( REGEX REPLACE "[^A-Za-z0-9]" "" TMP_NAME2 "${TMP_NAME2}")
if( "${TMP_NAME2}" MATCHES "MULLECLANG")
set( MULLE_CXX_COMPILER_ID "${TMP_NAME2}")
else()
set( MULLE_CXX_COMPILER_ID "${TMP_NAME}")
endif()
endif()
endif()

Expand Down

0 comments on commit a4621e8

Please sign in to comment.