class CKick::LibraryLink
Represents a library link (-l compiler option or library name to be passed to CMake target_link_libraries() function)
Public Class Methods
new(args={})
click to toggle source
initializes object with an Hash
hash keys:
-
:name
- library name (lib#{name}.a/.so) as is
# File lib/ckick/library_link.rb, line 15 def initialize args={} name = args[:name] || "" raise CKick::IllegalInitializationError, "No name provided to library link" unless name.is_a?(String) && !name.empty? @name = name end
Public Instance Methods
cmake()
click to toggle source
cmake code content (only library name, not command)
# File lib/ckick/library_link.rb, line 39 def cmake @name end
raw_flag()
click to toggle source
corresponding compiler link flag (-l option)
# File lib/ckick/library_link.rb, line 34 def raw_flag "-l#{@name}" end
to_hash_element()
click to toggle source
converts to hashable element name as is
# File lib/ckick/library_link.rb, line 23 def to_hash_element @name end
to_s()
click to toggle source
converts to String
name as is
# File lib/ckick/library_link.rb, line 29 def to_s @name end