mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-18 22:05:15 +03:00
[SETTINGS] Cleanup the settings generator a bit
- Don't include target.h explicitely, it's already included by platform.h - Fix an error in compiled file as a test for discovering contstants. Since we rely on compiler errors to give us the resolved value, that lets us get one extra value on each run - Always compile the test files for setting discovery in c++11 even if no -std=XXX argument is passed from the caller.
This commit is contained in:
parent
074c4dec1c
commit
55943a0630
2 changed files with 4 additions and 3 deletions
|
@ -57,6 +57,7 @@ class Compiler
|
|||
def default_args
|
||||
cflags = Shellwords.split(ENV["CFLAGS"] || "")
|
||||
args = [@path]
|
||||
args << "-std=c++11"
|
||||
cflags.each do |flag|
|
||||
# Don't generate temporary files
|
||||
if flag == "" || flag == "-MMD" || flag == "-MP" || flag.start_with?("-save-temps")
|
||||
|
@ -67,7 +68,7 @@ class Compiler
|
|||
next
|
||||
end
|
||||
if flag.start_with? "-std="
|
||||
flag = "-std=c++11"
|
||||
next
|
||||
end
|
||||
if flag.start_with? "-D'"
|
||||
# Cleanup flag. Done by the shell when called from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue