feat: build OpenComposite as debug, too, if specified

This commit is contained in:
libjared 2023-10-30 05:50:44 +00:00 committed by GabMus
parent 290ee548cd
commit 81253e15a0
2 changed files with 14 additions and 3 deletions

View file

@ -9,7 +9,11 @@ use std::{
path::Path,
};
pub fn get_build_opencomposite_jobs(profile: &Profile, clean_build: bool) -> VecDeque<WorkerJob> {
pub fn get_build_opencomposite_jobs(
profile: &Profile,
clean_build: bool,
debug_build: bool,
) -> VecDeque<WorkerJob> {
let mut jobs = VecDeque::<WorkerJob>::new();
let git = Git {
@ -25,7 +29,10 @@ pub fn get_build_opencomposite_jobs(profile: &Profile, clean_build: bool) -> Vec
let build_dir = format!("{}/build", profile.opencomposite_path);
let mut cmake_vars: HashMap<String, String> = HashMap::new();
cmake_vars.insert("CMAKE_BUILD_TYPE".into(), "Release".into());
cmake_vars.insert(
"CMAKE_BUILD_TYPE".into(),
(if debug_build { "Debug" } else { "Release" }).into(),
);
let cmake = Cmake {
env: None,
vars: Some(cmake_vars),

View file

@ -462,7 +462,11 @@ impl SimpleComponent for App {
});
// no listed deps for opencomp
}
jobs.extend(get_build_opencomposite_jobs(&profile, clean_build));
jobs.extend(get_build_opencomposite_jobs(
&profile,
clean_build,
debug_build,
));
if !missing_deps.is_empty() {
missing_deps.sort_unstable();
missing_deps.dedup(); // dedup only works if sorted, hence the above