Hi P.O.

> On 21 Nov 2025, at 09:34, P. O. Jonsson <[email protected]> wrote:
> 
> 
> Since I am also curious to understand, will CMake be case sensitive, i.e. 
> will there be a difference between “Debug” “debug” and “DEBUG”?
> 
> Will this be the same over all platforms? We have case sensitive Linuxes, 
> case insensitive Windowses and case aware MacOs which is something inbetween 
> and it would simply things if they all behaved the same. 


ChatGPT info, my CMake knowledge is limited...

CMAKE_BUILD_TYPE has no default value.
so empty by default.
The cmake snippet below shows how to assign a default value, if needed.
I couldn't find a default value in our CMakeList.txt file, or I missed it.

STREQUAL is case sensitive.
The cmake snippet below shows how to be case-insensitive.

Currently testing "Debug", the purpose is to not activate IPO in this case.
No impact for the other build types like Release or RelDbg.



I have a question about the names of the portable packages.
oorexx-5.2.0-13048.opensuse15.x86_64-portable-release.zip 
<https://sourceforge.net/projects/oorexx/files/oorexx/5.2.0beta/portable/oorexx-5.2.0-13048.opensuse15.x86_64-portable-release.zip/download>

They contain "-release" or "-debug"
string(TOLOWER "${CMAKE_BUILD_TYPE}" rexx_build_type)
   set (zip_name "${CPACK_PACKAGE_FILE_NAME}-portable-${rexx_build_type}")


I don't understand from where is taken the value of CMAKE_BUILD_TYPE.

If I'm not wrong, the current cmake command does not pass -D 
CMAKE_BUILD_TYPE=Release (or Debug)
From the mail you forwarded:
> /usr/local/bin/cmake -G 'Unix Makefiles' -DCMAKE_POLICY_VERSION_MINIMUM=3.5 
> -DBUILD_OSX_UNIVERSAL_BINARIES=1 -DBUILD_DMG=1 -DBUILD_SOURCE=1 
> -DOS_DIST=macos ../oorexxSVN






Cmake snippet by ChatGPT, just sharing in case we need to change something.
The bold part assigns a default value to CMAKE-BUILD_TYPE.


# Detect whether this is a multi-config generator (e.g. Visual Studio, Xcode)
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

if(NOT IS_MULTI_CONFIG)
    # For single-config generators (Unix Makefiles, Ninja), ensure a default 
build type.
    if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
        set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
    endif()
endif()

# Normalize build type to lowercase for reliable comparison
string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_LOWER)

if(BUILD_TYPE_LOWER STREQUAL "debug")
    message(STATUS "Configuring for Debug mode")
elseif(BUILD_TYPE_LOWER STREQUAL "release")
    message(STATUS "Configuring for Release mode")
elseif(BUILD_TYPE_LOWER STREQUAL "relwithdebinfo")
    message(STATUS "Configuring for RelWithDebInfo mode")
elseif(BUILD_TYPE_LOWER STREQUAL "minsizerel")
    message(STATUS "Configuring for MinSizeRel mode")
else()
    message(WARNING "Unknown build type: '${CMAKE_BUILD_TYPE}'")
endif()



_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to