Browse Source

device: only devel and debug can compile data

Daniele Bartolini 6 năm trước cách đây
mục cha
commit
14f6c90153
3 tập tin đã thay đổi với 8 bổ sung4 xóa
  1. 4 4
      src/config.h
  2. 2 0
      src/device/main_linux.cpp
  3. 2 0
      src/device/main_windows.cpp

+ 4 - 4
src/config.h

@@ -12,7 +12,7 @@
 #define CROWN_VERSION_PATCH 0
 
 #define CROWN_VERSION CE_STRINGIZE(CROWN_VERSION_MAJOR) \
-	"." CE_STRINGIZE(CROWN_VERSION_MINOR) \
+	"." CE_STRINGIZE(CROWN_VERSION_MINOR)               \
 	"." CE_STRINGIZE(CROWN_VERSION_PATCH)
 
 #ifndef CROWN_DEBUG
@@ -23,9 +23,9 @@
 	#define CROWN_DEVELOPMENT 0
 #endif // CROWN_DEVELOPMENT
 
-#ifndef CROWN_CAN_COMPILE
-	#define CROWN_CAN_COMPILE (CROWN_PLATFORM_LINUX || CROWN_PLATFORM_WINDOWS)
-#endif
+#define CROWN_CAN_COMPILE ((CROWN_DEBUG || CROWN_DEVELOPMENT) \
+	&& (CROWN_PLATFORM_LINUX || CROWN_PLATFORM_WINDOWS)       \
+	? 1 : 0)
 
 #ifndef CROWN_TOOLS
 	#define CROWN_TOOLS 0

+ 2 - 0
src/device/main_linux.cpp

@@ -856,12 +856,14 @@ int main(int argc, char** argv)
 	if (quit)
 		return ec;
 
+#if CROWN_CAN_COMPILE
 	if (ec == EXIT_SUCCESS && (opts._do_compile || opts._server))
 	{
 		ec = main_data_compiler(opts);
 		if (!opts._do_continue)
 			return ec;
 	}
+#endif
 
 	if (ec == EXIT_SUCCESS)
 		ec = s_ldvc.run(&opts);

+ 2 - 0
src/device/main_windows.cpp

@@ -759,12 +759,14 @@ int main(int argc, char** argv)
 	if (quit)
 		return ec;
 
+#if CROWN_CAN_COMPILE
 	if (ec == EXIT_SUCCESS && (opts._do_compile || opts._server))
 	{
 		ec = main_data_compiler(opts);
 		if (!opts._do_continue)
 			return ec;
 	}
+#endif
 
 	if (ec == EXIT_SUCCESS)
 		ec = s_wdvc.run(&opts);