Bladeren bron

Fix windows build

Daniele Bartolini 9 jaren geleden
bovenliggende
commit
68c8db4d0c
2 gewijzigde bestanden met toevoegingen van 32 en 20 verwijderingen
  1. 31 0
      src/resource/compile_options.cpp
  2. 1 20
      src/resource/compile_options.h

+ 31 - 0
src/resource/compile_options.cpp

@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012-2016 Daniele Bartolini and individual contributors.
+ * License: https://github.com/taylor001/crown/blob/master/LICENSE
+ */
+
+#include "compile_options.h"
+#include "os.h"
+
+namespace crown
+{
+int CompileOptions::run_external_compiler(const char* const* argv, StringStream& output)
+{
+	TempAllocator512 ta;
+	StringStream ss(ta);
+
+	for (s32 i = 1; argv[i] != NULL; ++i)
+	{
+		const char* arg = argv[i];
+		for (; *arg; ++arg)
+		{
+			if (*arg == ' ')
+				ss << '\\';
+			ss << *arg;
+		}
+		ss << ' ';
+	}
+
+	return os::execute_process(argv[0], string_stream::c_str(ss), output);
+}
+
+} // namespace crown

+ 1 - 20
src/resource/compile_options.h

@@ -12,7 +12,6 @@
 #include "filesystem.h"
 #include "guid.h"
 #include "log.h"
-#include "os.h"
 #include "path.h"
 #include "string_stream.h"
 #include "temp_allocator.h"
@@ -208,25 +207,7 @@ public:
 		vector::push_back(_dependencies, dep);
 	}
 
-	int run_external_compiler(const char* const* argv, StringStream& output)
-	{
-		TempAllocator512 ta;
-		StringStream ss(ta);
-
-		for (s32 i = 1; argv[i] != NULL; ++i)
-		{
-			const char* arg = argv[i];
-			for (; *arg; ++arg)
-			{
-				if (*arg == ' ')
-					ss << '\\';
-				ss << *arg;
-			}
-			ss << ' ';
-		}
-
-		return os::execute_process(argv[0], string_stream::c_str(ss), output);
-	}
+	int run_external_compiler(const char* const* argv, StringStream& output);
 };
 
 } // namespace crown