Untested cmake build backend.
This commit is contained in:
parent
cfa33308e7
commit
60f5e55489
@ -109,6 +109,8 @@ class Package::Context
|
||||
@selected_packaging_backend = @packaging_backends[0]
|
||||
|
||||
@building_backends << Backend::Building.new "configure", "autotools" do |context, recipe|
|
||||
next BuildStatus::Pass unless Dir.exists? recipe.dirname
|
||||
|
||||
Dir.cd recipe.dirname
|
||||
|
||||
unless File.exists? "configure"
|
||||
@ -124,7 +126,28 @@ class Package::Context
|
||||
end
|
||||
end
|
||||
|
||||
@building_backends << Backend::Building.new "configure", "cmake" do |context, recipe|
|
||||
next BuildStatus::Pass unless Dir.exists? recipe.dirname
|
||||
|
||||
Dir.cd recipe.dirname
|
||||
|
||||
next BuildStatus::Pass unless File.exists? "CMakeLists.txt"
|
||||
|
||||
options = [
|
||||
"-DCMAKE_INSTALL_PREFIX='#{recipe.prefix}'",
|
||||
"-DCMAKE_BUILD_TYPE=Release #{recipe.options["cmake"]}"
|
||||
]
|
||||
|
||||
child = context.sh "cmake . #{options.join " "}"
|
||||
if child.exit_status == 0
|
||||
BuildStatus::Success
|
||||
else
|
||||
BuildStatus::Failed
|
||||
end
|
||||
end
|
||||
|
||||
@building_backends << Backend::Building.new "build", "make" do |context, recipe|
|
||||
next BuildStatus::Pass unless Dir.exists? recipe.dirname
|
||||
Dir.cd recipe.dirname
|
||||
|
||||
unless File.exists? "Makefile"
|
||||
@ -141,6 +164,7 @@ class Package::Context
|
||||
end
|
||||
|
||||
@building_backends << Backend::Building.new "install", "make" do |context, recipe|
|
||||
next BuildStatus::Pass unless Dir.exists? recipe.dirname
|
||||
Dir.cd recipe.dirname
|
||||
|
||||
unless File.exists? "Makefile"
|
||||
|
Reference in New Issue
Block a user