summaryrefslogtreecommitdiff
path: root/src/rebuild.h
blob: 8e0c78a62caf9f23f3eafb3896b9c231512dec36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
#pragma once

#include <vector>
#include <array>
#include <string>
#include <functional>

#include "ctor.h"

struct BuildConfigurationEntry
{
	std::string file;
	std::function<ctor::build_configurations (const ctor::settings&)> cb;
};

std::vector<BuildConfigurationEntry>& getConfigFileList();

struct ExternalConfigurationEntry
{
	std::string file;
	std::function<ctor::external_configurations (const ctor::settings&)> cb;
};

std::vector<ExternalConfigurationEntry>& getExternalConfigFileList();

int reg(const char* location);
int unreg(const char* location);

//! Returns true of recompilation was needed.
bool recompileCheck(const ctor::settings& settings, int argc, char* argv[],
                    bool relaunch_allowed = true);