mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-30 05:56:53 +00:00
Proper handling of precompiled header compilation
This commit is contained in:
parent
8d7fc2723b
commit
789b258af6
11
Rakefile
11
Rakefile
@ -54,19 +54,16 @@ cxx_compiler = lambda do |t|
|
||||
else c(:CXXFLAGS_NO_SRC_COMMON)
|
||||
end
|
||||
|
||||
if t.sources.empty?
|
||||
puts "EMPTY SOURCES! #{t.name}"
|
||||
pp t
|
||||
exit 1
|
||||
end
|
||||
# t.sources is empty for a 'file' task (common_pch.h.o).
|
||||
sources = t.sources.empty? ? [ t.prerequisites.first ] : t.sources
|
||||
|
||||
runq " CXX #{t.source}", "#{c(:CXX)} #{c(:CXXFLAGS)} #{c(:INCLUDES)} #{$system_includes} #{cxxflags} -c -MMD -o #{t.name} #{t.sources.join(" ")}", :allow_failure => true
|
||||
runq " CXX #{sources.first}", "#{c(:CXX)} #{c(:CXXFLAGS)} #{c(:INCLUDES)} #{$system_includes} #{cxxflags} -c -MMD -o #{t.name} #{sources.join(" ")}", :allow_failure => true
|
||||
handle_deps t.name, last_exit_code
|
||||
end
|
||||
|
||||
# Precompiled headers
|
||||
if c?(:USE_PRECOMPILED_HEADERS)
|
||||
file $all_objects => "src/common/common_pch.h.o"
|
||||
$all_objects.each { |name| file name => "src/common/common_pch.h.o" }
|
||||
file "src/common/common_pch.h.o" => "src/common/common_pch.h", &cxx_compiler
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user