Skip to content

cross_cmake doesn't respect CMAKE_BUILD_TYPE overrides #314

@arnaldo2792

Description

@arnaldo2792

Image I'm using:
Bottlerocket SDK 0.65.1

Issue or Feature Request:

Packages built with cross_cmake can't override CMAKE_BUILD_TYPE as the toolchain.cmake file takes precedence over -D overrides.

I'm trying to overide CMAKE_BUILD_TYPE like so:

%cross_cmake .. \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo
    # ...some other options

I patched the .cmake files of the sources I'm trying to build to print the actual value of CMAKE_BUILD_TYPE and I saw this message:

-- CMAKE_BUILD_TYPE: 'Release' 

When I remove set(CMAKE_BUILD_TYPE Release) from the toolchain file, I see:

-- CMAKE_BUILD_TYPE: 'RelWithDebInfo' 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions