summaryrefslogtreecommitdiff
path: root/source/core/slang-cpp-compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-cpp-compiler.h')
-rw-r--r--source/core/slang-cpp-compiler.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/core/slang-cpp-compiler.h b/source/core/slang-cpp-compiler.h
index 185e960f3..d87ed63dc 100644
--- a/source/core/slang-cpp-compiler.h
+++ b/source/core/slang-cpp-compiler.h
@@ -6,6 +6,8 @@
#include "slang-process-util.h"
+#include "slang-platform.h"
+
namespace Slang
{
@@ -93,6 +95,7 @@ public:
enum Enum : Flags
{
EnableExceptionHandling = 0x01,
+ Verbose = 0x02,
};
};
@@ -104,6 +107,8 @@ public:
Flags flags = Flag::EnableExceptionHandling;
+ PlatformKind platform = PlatformKind::Unknown;
+
String modulePath; ///< The path/name of the output module. Should not have the extension, as that will be added for each of the target types
List<Define> defines;
@@ -171,7 +176,7 @@ public:
struct Output
{
/// Reset to an initial empty state
- void reset() { messages.clear(); result = SLANG_OK; }
+ void reset() { messages.clear(); rawMessages = String(); result = SLANG_OK; }
/// Get the number of messages by type
Index getCountByType(OutputMessage::Type type) const;
@@ -189,6 +194,8 @@ public:
/// Remove all messages of the type
void removeByType(OutputMessage::Type type);
+ String rawMessages;
+
SlangResult result;
List<OutputMessage> messages;
};
@@ -287,6 +294,7 @@ struct CPPCompilerBaseUtil
typedef CPPCompiler::TargetType TargetType;
typedef CPPCompiler::DebugInfoType DebugInfoType;
typedef CPPCompiler::SourceType SourceType;
+ typedef CPPCompiler::CompilerType CompilerType;
typedef CPPCompiler::OutputMessage OutputMessage;
typedef CPPCompiler::FloatingPointMode FloatingPointMode;
@@ -303,6 +311,14 @@ struct CPPCompilerUtil: public CPPCompilerBaseUtil
Newest,
};
+ struct InitializeSetDesc
+ {
+ const String& getPath(CompilerType type) const { return paths[int(type)]; }
+ void setPath(CompilerType type, const String& path) { paths[int(type)] = path; }
+
+ String paths[int(CPPCompiler::CompilerType::CountOf)];
+ };
+
/// Find a compiler
static CPPCompiler* findCompiler(const CPPCompilerSet* set, MatchType matchType, const CPPCompiler::Desc& desc);
static CPPCompiler* findCompiler(const List<CPPCompiler*>& compilers, MatchType matchType, const CPPCompiler::Desc& desc);
@@ -315,7 +331,7 @@ struct CPPCompilerUtil: public CPPCompilerBaseUtil
static const CPPCompiler::Desc& getCompiledWithDesc();
/// Given a set, registers compilers found through standard means and determines a reasonable default compiler if possible
- static SlangResult initializeSet(CPPCompilerSet* set);
+ static SlangResult initializeSet(const InitializeSetDesc& desc, CPPCompilerSet* set);
};
}