From e3289f88bae9d45796452e104334fefead578230 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 10 Sep 2021 12:13:56 +0300 Subject: [PATCH] aedi: do not store absolute paths in object files cmake generated makefiles pass absolute paths to compiler, -ffile-prefix-map command line option helps to avoid this issue make target doesn't need this options because it's built in-tree --- aedi/target/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aedi/target/base.py b/aedi/target/base.py index 9cce06f4..6024cb5f 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -393,6 +393,8 @@ class CMakeTarget(BuildTarget): args = [ 'cmake', '-DCMAKE_BUILD_TYPE=Release', + f'-DCMAKE_C_FLAGS="-ffile-prefix-map={state.source}/="', + f'-DCMAKE_CXX_FLAGS="-ffile-prefix-map={state.source}/="', f'-DCMAKE_INSTALL_PREFIX={state.install_path}', f'-DCMAKE_PREFIX_PATH={state.prefix_path}', ]