summaryrefslogtreecommitdiffhomepage
path: root/file.h
blob: ba3dfdd4ce58f02b1c72e8845c1efcd02b50b3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <filesystem>
#include <string>
#include <vector>

extern const std::filesystem::path YMakefile;

bool is_buildable_by_extension(const std::filesystem::path& p);
bool is_compile_unit_source_by_extension(const std::filesystem::path& p);

bool is_dynamic_lib(const std::filesystem::path& p);
bool is_static_lib(const std::filesystem::path& p);
std::filesystem::path soname_shorter(const std::filesystem::path& p);
std::filesystem::path soname_short(const std::filesystem::path& p);

// removes initial "./"
std::filesystem::path simplified_path(const std::filesystem::path& p);

std::string env_value(const std::string& key);
bool is_executable(const std::string& file);
std::string find_executable(const std::vector<std::string>& list);