Class: CKick::Executable
Overview
represents an executable target (in respect to CMake add_executable() command)
Instance Method Summary collapse
-
#cmake ⇒ Object
CMakeLists content of the target.
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
#cmake ⇒ Object
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 |