Skip to content

cable_add_cxx_compiler_flag_if_supported breaks options that rely on slashes being preserved #15

@ekpyron

Description

@ekpyron

@axic suggested I mention this here: in the solidity repo we have to deviate from cable's cable_add_cxx_compiler_flag_if_supported, due to the regex in

string(REGEX REPLACE "^-|/" "" name ${FLAG})

Specifically we have eth_add_cxx_compiler_flag_if_supported("-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=/solidity") in
https://github.com/ethereum/solidity/blob/0015e8cd847ae81926438e7f8aa90b89ed328e0c/cmake/EthCompilerSettings.cmake#L29
which relies on slashes that are not at the beginning of the option to be left untouched.

We noticed when @axic attempted to re-sync our ancient eth_add_cxx_compiler_flag_if_supported with the current cable_add_cxx_compiler_flag_if_supported from here.

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