diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-14 07:46:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-14 07:46:43 +0200 |
commit | ba04d2889a4e017c6043bac9951f722e60b63bc5 (patch) | |
tree | 1267f9264dfe81aadeac46446ee6122a5abe5190 /src/task_ld.cc | |
parent | f7fda8ca8841552b54ce72ed8ca9156cc09368d0 (diff) |
Add suport for building and running unittests with the 'check' target.
Diffstat (limited to 'src/task_ld.cc')
-rw-r--r-- | src/task_ld.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/task_ld.cc b/src/task_ld.cc index 4a77c72..ec68190 100644 --- a/src/task_ld.cc +++ b/src/task_ld.cc @@ -44,7 +44,11 @@ TaskLD::TaskLD(const BuildConfiguration& config, , config(config) , settings(settings) { - target_type = TargetType::Executable; + target_type = config.type; + if(target_type == TargetType::Auto) + { + target_type = TargetType::Executable; + } targetFile = settings.builddir; targetFile /= target; @@ -65,7 +69,6 @@ TaskLD::TaskLD(const BuildConfiguration& config, flagsFile = settings.builddir / targetFile.stem(); flagsFile += ".flags"; - target_type = TargetType::Executable; source_language = Language::C; for(const auto& source : config.sources) { |