``cable_add_cxx_compiler_flag_if_supported`` breaks options that rely on slashes being preserved
- Dominant language
- CMake
- Stars
- 37
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
@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
https://github.com/ethereum/cable/blob/ccd2732e8c11d33cddb6b43ce4e9850dc70fbbac/CableCompilerSettings.cmake#L34
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in CableCompilerSettings.cmake at the regex around line 34 and compare it with the Solidity usage in cmake/EthCompilerSettings.cmake at line 29. Check how cable_add_cxx_compiler_flag_if_supported handles -fmacro-prefix-map=${CMAKE_SOURCE_DIR}=/solidity, then verify that slashes not at the beginning of the option remain unchanged and that Cable no longer needs the Solidity-specific deviation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100