Sha256: 4e15cafc5e143f0d4adba2bb51d03c4fbf3cd57adc89e25c703468a81609716d

Contents?: true

Size: 524 Bytes

Versions: 7

Compression:

Stored size: 524 Bytes

Contents

module Xcake
  module Generator
    # This build phase generator detects source
    # files and adds them to the compile build phase.
    #
    class CompileSourceBuildPhase < BuildPhase

      def self.can_install_node(node)
        File.directory?(node.path) == false &&
        [".c", ".m", ".mm", ".cpp", ".swift"].include?(File.extname(node.path))
      end

      def add_file_reference_to_target(file_reference, target)
        target.source_build_phase.add_file_reference(file_reference)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
xcake-0.3.1 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.3.0 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.1.9 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.1.8 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.1.7 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.1.6 lib/xcake/generator/build_phase/compile_source_build_phase.rb
xcake-0.1.5 lib/xcake/generator/build_phase/compile_source_build_phase.rb