build/support/cplusplus.rb in passenger-5.3.4 vs build/support/cplusplus.rb in passenger-5.3.5
- old
+ new
@@ -148,17 +148,17 @@
ensure_target_directory_exists(target)
run_compiler("#{cxx} #{shlib_flag} #{objects} #{fPIC} -o #{target} #{flags}")
end
def define_c_object_compilation_task(object, source, options_or_flags = nil)
- options = options_or_flags if options_or_flags.is_a?(Hash)
+ options = options_or_flags if options_or_flags.is_a?(Hash) || options_or_flags.respond_to?(:call)
file(object => generate_compilation_task_dependencies(source, options)) do
compile_c(object, source, options_or_flags)
end
end
def define_cxx_object_compilation_task(object, source, options_or_flags = nil)
- options = options_or_flags if options_or_flags.is_a?(Hash)
+ options = options_or_flags if options_or_flags.is_a?(Hash) || options_or_flags.respond_to?(:call)
file(object => generate_compilation_task_dependencies(source, options)) do
compile_cxx(object, source, options_or_flags)
end
end