polserver/pol-core/bscript/compilercfg.h
Kevin Eady 62a252ad3a
Add daemon watch mode to ecompile (#630)
* Add libefsw at 3419347

* saving work

* some cleanup

* move to fs::paths

* saving work.. maybe hitting a limit with number of watched dirs?

* migrate to watching only ecompile.cfg specified folders, cleanup/doc

* Display summary between compilations in watch mode; fix cache reuse

* Fix inf loop; some cmake, format changes...

* some windows compilation fixes... tweaks to windows cmake?

* Update Efsw.cmake for build lib changes

* removed debug flag

* silence efsw build
dont add antlr project if it already exists

* Address review comments:
- use std::move on efswwatcher add_*

* add docs

* Add WatchModeByDefault ecompile.cfg option

* iniital work on tests

* Add CI actions

* some changes (passes locally on win, mac, linux)

* Fix fixtures dependency; use ecompile verbose mode

* Add core-changes

* Send ctrl+c instead of killing process

* Proper Python file naming

* Kill ecompile process on windows, SIGINT otherwise

---------

Co-authored-by: turleypol <turley@polserver.com>
2024-03-16 00:08:06 +01:00

71 lines
1.7 KiB
C++

/** @file
*
* @par History
*/
#ifndef BSCRIPT_COMPILERCFG_H
#define BSCRIPT_COMPILERCFG_H
#include <string>
#include <vector>
namespace Pol
{
namespace Bscript
{
struct CompilerConfig
{
std::vector<std::string> PackageRoot;
std::string IncludeDirectory;
std::string ModuleDirectory;
std::string PolScriptRoot;
bool GenerateListing;
bool GenerateDebugInfo;
bool GenerateDebugTextInfo;
int VerbosityLevel;
bool DisplayWarnings;
bool GenerateDependencyInfo;
bool CompileAspPages;
bool AutoCompileByDefault;
bool UpdateOnlyOnAutoCompile;
bool OnlyCompileUpdatedScripts;
bool WatchModeByDefault;
bool DisplaySummary;
bool DisplayUpToDateScripts;
bool OptimizeObjectMembers;
bool ErrorOnWarning;
bool ThreadedCompilation;
int NumberOfThreads;
bool ParanoiaWarnings;
bool ErrorOnFileCaseMissmatch;
int EmParseTreeCacheSize;
int IncParseTreeCacheSize;
// Formatter
size_t FormatterLineWidth = 80;
bool FormatterKeepKeywords = false;
unsigned short FormatterIdentLevel = 2;
bool FormatterMergeEmptyLines = true;
bool FormatterEmptyParenthesisSpacing = false;
bool FormatterEmptyBracketSpacing = false;
bool FormatterConditionalParenthesisSpacing = true;
bool FormatterParenthesisSpacing = true;
bool FormatterBracketSpacing = true;
bool FormatterDelimiterSpacing = true;
bool FormatterAssignmentSpacing = true;
bool FormatterComparisonSpacing = true;
bool FormatterOperatorSpacing = true;
bool FormatterWindowsLineEndings = false;
bool FormatterUseTabs = false;
unsigned short FormatterTabWidth = 4;
bool FormatterInsertNewlineAtEOF = false;
void Read( const std::string& path );
void SetDefaults();
};
extern CompilerConfig compilercfg;
} // namespace Bscript
} // namespace Pol
#endif