diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6333451..932a50f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,3 +1,7 @@ +### 0.20.5 + +Various small improvements + ### 0.20.4 * Various small improvements diff --git a/cmake/share/CompilerDetectionAuxC.cmake b/cmake/share/CompilerDetectionAuxC.cmake index 41b1091..3d557c4 100644 --- a/cmake/share/CompilerDetectionAuxC.cmake +++ b/cmake/share/CompilerDetectionAuxC.cmake @@ -12,7 +12,8 @@ if( NOT __COMPILER_DETECTION_AUX_C_CMAKE__) # # Detect if compiling with mulle-clang # - if( MULLE_C_COMPILER_ID MATCHES "MulleClang" OR "$ENV{CC}" MATCHES ".*mulle-cl.*") + if( MULLE_C_COMPILER_ID MATCHES "MULLECLANG" OR "$ENV{CC}" MATCHES ".*mulle-cl.*") + message( STATUS "MulleClang compiler detected") set( MULLE_OBJC ON) else() set( MULLE_OBJC OFF) diff --git a/cmake/share/CompilerDetectionC.cmake b/cmake/share/CompilerDetectionC.cmake index 33b88b4..5d90a07 100644 --- a/cmake/share/CompilerDetectionC.cmake +++ b/cmake/share/CompilerDetectionC.cmake @@ -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() diff --git a/cmake/share/CompilerFlagsObjC.cmake b/cmake/share/CompilerFlagsObjC.cmake index 1640790..6e05d5e 100644 --- a/cmake/share/CompilerFlagsObjC.cmake +++ b/cmake/share/CompilerFlagsObjC.cmake @@ -12,20 +12,18 @@ if( NOT __COMPILER_FLAGS_OBJC_CMAKE__) # # only useful in mulle-objc # - option( OBJC_TAO_DEBUG_ENABLED "Enable Objective-C TAO for debug builds" MULLE_OBJC) + option( OBJC_TAO_DEBUG_DISABLED "Disable Objective-C TAO for debug builds" OFF) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OTHER_OBJC_FLAGS} ${UNWANTED_OBJC_WARNINGS}") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OTHER_OBJC_FLAGS} ${UNWANTED_OBJC_WARNINGS}") - if( CMAKE_BUILD_TYPE) - string( TOUPPER "${CMAKE_BUILD_TYPE}" TMP_CONFIGURATION_NAME) - if( TMP_CONFIGURATION_NAME STREQUAL "DEBUG") - if( OBJC_TAO_DEBUG_ENABLED) - message( STATUS "Objective-C TAO enabled") - add_definitions( "-fobjc-tao") - endif() - else() - add_definitions( "-DNS_BLOCK_ASSERTIONS" ) + string( TOUPPER "${CMAKE_BUILD_TYPE}" TMP_CONFIGURATION_NAME) + if( TMP_CONFIGURATION_NAME STREQUAL "DEBUG") + if( MULLE_OBJC AND NOT OBJC_TAO_DEBUG_DISABLED) + message( STATUS "Objective-C TAO enabled") + add_definitions( "-fobjc-tao") endif() + else() + add_definitions( "-DNS_BLOCK_ASSERTIONS" ) endif() endif()