Przeglądaj źródła

Added version suffix for debug/release

master
Robin Thoni 4 lat temu
rodzic
commit
65502e543f
Podpisane przez: Robin THONI <robin@rthoni.com> ID klucza GPG: 4E09DEF46B99E61E
2 zmienionych plików z 7 dodań i 2 usunięć
  1. 1
    1
      AppCore.cpp
  2. 6
    1
      CMakeLists.txt

+ 1
- 1
AppCore.cpp Wyświetl plik

@@ -54,7 +54,7 @@ BoilerTankMenuActivity g_menuWaterActivity(&g_homeActivity, &g_menuVersionActivi
54 54
 BoilerTankMenuActivity g_menuHeaterActivity(&g_homeActivity, &g_menuWaterActivity, &g_menuVersionActivity, "Chauffage",
55 55
                                             "", &g_appState.tanks[1]);
56 56
 MenuItemActivity g_menuVersionActivity(&g_homeActivity, nullptr, &g_menuHeaterActivity, &g_menuWaterActivity, "Version",
57
-                                       xstr(APP_CORE_VERSION) " - " xstr(APP_CORE_COMMIT));
57
+                                       xstr(APP_CORE_VERSION) " " xstr(APP_CORE_COMMIT));
58 58
 
59 59
 
60 60
 int freeRam()

+ 6
- 1
CMakeLists.txt Wyświetl plik

@@ -23,7 +23,12 @@ set(${CMAKE_PROJECT_NAME}_ALL_SRCS main.ino TempInput.cpp BoilerTankService.cpp
23 23
 set(${CMAKE_PROJECT_NAME}_SKETCH main.ino)
24 24
 generate_arduino_firmware(${CMAKE_PROJECT_NAME})
25 25
 
26
-add_definitions(-DAPP_CORE_VERSION=1.0.0)
26
+if (CMAKE_BUILD_TYPE MATCHES "Debug")
27
+    set(APP_CORE_VERSION_SUFFIX D)
28
+else()
29
+    set(APP_CORE_VERSION_SUFFIX R)
30
+endif()
31
+add_definitions(-DAPP_CORE_VERSION=1.0.0${APP_CORE_VERSION_SUFFIX})
27 32
 
28 33
 execute_process(
29 34
         COMMAND

Ładowanie…
Anuluj
Zapisz