aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalLib.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-28 22:55:50 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-28 22:56:34 +0100
commit179c5baaa2b24be61f65daad0e4d415914af4c71 (patch)
treeaff81e8c9b158bfe44789305012aa06ec951b482 /src/GlobalLib.cpp
parent9ffe3db21297192b0f26929e74327487905ad444 (diff)
Add support for tests in a package where type is executable
Diffstat (limited to 'src/GlobalLib.cpp')
-rw-r--r--src/GlobalLib.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index d994a27..cbc27bc 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -126,22 +126,7 @@ namespace sibs
return Result<string>::Err(errMsg);
}
- backend::Ninja::LibraryType libraryType;
- switch(sibsConfig.getPackageType())
- {
- case PackageType::STATIC:
- libraryType = backend::Ninja::LibraryType::STATIC;
- break;
- case PackageType::DYNAMIC:
- case PackageType::LIBRARY:
- libraryType = backend::Ninja::LibraryType::DYNAMIC;
- break;
- default:
- assert(false);
- return Result<string>::Err("Unexpected error");
- }
-
- backend::Ninja ninja(libraryType);
+ backend::Ninja ninja;
FileWalkCallbackFunc collectSourceFiles = [&ninja, &sibsConfig, &collectSourceFiles](tinydir_file *file)
{
if(file->is_reg)
@@ -189,7 +174,7 @@ namespace sibs
string libPath = buildPath;
libPath += "/lib";
libPath += name;
- if(libraryType == backend::Ninja::LibraryType::STATIC)
+ if(sibsConfig.getPackageType() == PackageType::STATIC)
{
libPath += ".a";
string libPathCmd = "'";
@@ -255,4 +240,4 @@ namespace sibs
return Archive::extract(libArchivedFilePath.c_str(), libPath.c_str());
}
-} \ No newline at end of file
+}