Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Rework handling compiler flags #82

Merged
merged 2 commits into from
Mar 25, 2024
Merged

Commits on Mar 25, 2024

  1. [FIXUP] cmake: Fix flags handling

    1. Use standard CMake's way to pass flags from depends to the main build
    system using CMAKE_<LANGUAGE>_FLAGS_INIT variables instead of custom
    DEPENDS_<LANGUAGE>_COMPILER_FLAGS ones. This guaranties using those
    flags during various checks at the configuration stage.
    
    2. Setting flags is decoupled from setting compilers in the toolchain
    file.
    
    3. Per-configuration flags are cached properly.
    
    4. No longer needed to set -DCMAKE_BUILD_TYPE=None when building with
    depends.
    
    Fixes cross compilation for macOS.
    
    Allows the user to use {C,CXX}FLAGS environment variables for depends
    and the main build system without drawbacks/workarounds.
    hebasto committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    56ef358 View commit details
    Browse the repository at this point in the history
  2. depends: Amend handling flags environment variables

    If any of {C,CXX,CPP,LD}FLAGS is specified it should be assigned to
    a non-type-specific variable.
    hebasto committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    dbd2f7a View commit details
    Browse the repository at this point in the history