Replace build source path in __FILE__ macros.

This commit is contained in:
Daniel Kirchner 2019-10-02 17:25:10 +02:00
parent 2d150b659e
commit c823b3519e

View File

@ -23,6 +23,9 @@ endif()
eth_add_cxx_compiler_flag_if_supported(-Wimplicit-fallthrough) eth_add_cxx_compiler_flag_if_supported(-Wimplicit-fallthrough)
# Prevent the path of the source directory from ending up in the binary via __FILE__ macros.
eth_add_cxx_compiler_flag_if_supported("-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=/solidity")
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
# Enables all the warnings about constructions that some users consider questionable, # Enables all the warnings about constructions that some users consider questionable,
# and that are easy to avoid. Also enable some extra warning flags that are not # and that are easy to avoid. Also enable some extra warning flags that are not