support clang and other compilers
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
using namespace std;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
struct MappedFile // todo: move to utils
|
||||
{
|
||||
// ~MappedFile()
|
||||
@@ -55,6 +58,8 @@ fs::path src_file;
|
||||
fs::path cache_dir;
|
||||
fs::path bin; // cache bins to avoid recompiles
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int src_arg = parse_args_until_src(argc, argv);
|
||||
@@ -81,6 +86,9 @@ int main(int argc, char* argv[])
|
||||
exec(run);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
int parse_args_until_src(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 2)
|
||||
@@ -285,3 +293,5 @@ bool is_src_file(const string_view p)
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user