Class: CKick::Executable

Inherits:
Target
  • Object
show all
Defined in:
lib/ckick/executable.rb

Overview

represents an executable target (in respect to CMake add_executable() command)

Instance Method Summary collapse

Methods inherited from Target

#create_structure, #initialize, #paths, #to_hash, #to_s

Methods included from Hashable

#to_hash, #to_no_empty_value_hash

Constructor Details

This class inherits a constructor from CKick::Target

Instance Method Details

#cmakeObject

CMakeLists content of the target



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/ckick/executable.rb', line 13

def cmake
  res = []

  res << "add_executable(#{@name} #{@source.join(' ')})"

  unless @libs.empty?
    res << "target_link_libraries(#{@name} #{@libs.join(' ')})"
  end

  res.join("\n")
end