Added debug build warnings

This commit is contained in:
Nav
2021-04-24 16:22:04 +01:00
parent 12c3fff689
commit 03a2bfab57
3 changed files with 15 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.12)
project(Bloom LANGUAGES CXX VERSION 0.0.2)
set(CMAKE_VERBOSE_MAKEFILE off)
@@ -158,6 +158,10 @@ target_link_options(
PUBLIC [=[-Wl,--disable-new-dtags]=] #,--verbose
)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_compile_definitions(BLOOM_DEBUG_BUILD)
endif()
if (${ENABLE_SANITIZERS})
message(WARNING "Sanitizers have been enabled")

View File

@@ -60,7 +60,7 @@ The components described above interact with each other using an event-based mec
To compile Bloom, the following dependencies must be resolved. The accompanying installation commands require support
for apt-get.
#### CMake version 3.10 or later:
#### CMake version 3.12 or later:
This can be installed via `sudo apt-get install cmake`, provided the appropriate version is available in your OS package
repositories. Otherwise, you'll need to download CMake from the official website.

View File

@@ -37,6 +37,10 @@ int Application::run(const std::vector<std::string>& arguments) {
}
}
#ifdef BLOOM_DEBUG_BUILD
Logger::warning("This is a debug build - some functions may not work as expected.");
#endif
this->startup();
if (this->insightConfig.insightEnabled) {
@@ -162,6 +166,11 @@ int Application::presentVersionText() {
Logger::silence();
std::cout << "Bloom v" << Application::VERSION_STR << "\n";
#ifdef BLOOM_DEBUG_BUILD
std::cout << "DEBUG BUILD - Compilation timestamp: " << __DATE__ << " " << __TIME__ << "\n";
#endif
std::cout << "https://bloom.oscillate.io/" << "\n";
std::cout << "Nav Mohammed" << std::endl;
return EXIT_SUCCESS;