mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-23 17:13:44 +08:00
SCons: respect cache read only (#29437)
* respect readonly * gitignore and move to correct folder * also copy old
This commit is contained in:
+13
-1
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
@@ -334,7 +335,18 @@ qt_flags = [
|
||||
qt_env['CXXFLAGS'] += qt_flags
|
||||
qt_env['LIBPATH'] += ['#selfdrive/ui']
|
||||
qt_env['LIBS'] = qt_libs
|
||||
qt_env['QT3_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
# Have to respect cache-readonly
|
||||
if GetOption('cache_readonly'):
|
||||
local_moc_files_dir = Dir("#.moc_files").abspath
|
||||
cache_moc_files_dir = cache_dir + "/moc_files"
|
||||
if os.path.exists(local_moc_files_dir):
|
||||
shutil.rmtree(local_moc_files_dir)
|
||||
if os.path.exists(cache_moc_files_dir):
|
||||
shutil.copytree(cache_moc_files_dir, local_moc_files_dir)
|
||||
qt_env['QT3_MOCHPREFIX'] = local_moc_files_dir + "/moc_"
|
||||
else:
|
||||
qt_env['QT3_MOCHPREFIX'] = cache_dir + '/moc_files/moc_'
|
||||
|
||||
if GetOption("clazy"):
|
||||
checks = [
|
||||
|
||||
Reference in New Issue
Block a user