Feature/configuration codegen (#1544)

Convert configuration document over to codegen
This commit is contained in:
Alexander Bock
2021-03-23 15:18:55 +01:00
committed by Alexander Bock
parent 48e2f35aa1
commit 0d82e1848f
8 changed files with 1205 additions and 751 deletions

View File

@@ -44,7 +44,7 @@ int main(int argc, char** argv) {
using namespace openspace;
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Debug,
ghoul::logging::LogLevel::Info,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
ghoul::initialize();
@@ -59,10 +59,21 @@ int main(int argc, char** argv) {
);
std::string configFile = configuration::findConfiguration();
*global::configuration = configuration::loadConfigurationFromFile(configFile);
// Register the base path as the directory where 'filename' lives
std::string base = ghoul::filesystem::File(configFile).directoryName();
constexpr const char* BasePathToken = "${BASE}";
FileSys.registerPathToken(BasePathToken, base);
*global::configuration = configuration::loadConfigurationFromFile(configFile, "");
global::openSpaceEngine->registerPathTokens();
global::openSpaceEngine->initialize();
ghoul::logging::LogManager::deinitialize();
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Info,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
FileSys.registerPathToken("${TESTDIR}", "${BASE}/tests");
// All of the relevant tests initialize the SpiceManager