mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
Clang: Force absolute paths
This helps with some diagnostics tools as we have various compile units in different paths.
This commit is contained in:
@@ -92,10 +92,12 @@ function(px4_add_common_flags)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# compiler specific flags
|
# compiler specific flags
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
|
||||||
|
|
||||||
# force color for clang (needed for clang + ccache)
|
# force color for clang (needed for clang + ccache)
|
||||||
add_compile_options(-fcolor-diagnostics)
|
add_compile_options(-fcolor-diagnostics)
|
||||||
|
# force absolute paths
|
||||||
|
add_compile_options(-fdiagnostics-absolute-paths)
|
||||||
|
|
||||||
# QuRT 6.4.X compiler identifies as Clang but does not support this option
|
# QuRT 6.4.X compiler identifies as Clang but does not support this option
|
||||||
if (NOT "${PX4_PLATFORM}" STREQUAL "qurt")
|
if (NOT "${PX4_PLATFORM}" STREQUAL "qurt")
|
||||||
|
|||||||
Reference in New Issue
Block a user