Skip to content

Commit

Permalink
+ config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evjeesm committed Sep 12, 2021
1 parent 31824a7 commit 0b72f30
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
32 changes: 4 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,11 @@ project(ObpsLog VERSION 1.0)
include(Import.cmake)
import_build_scripts()


# Determine ObpsLog build as a standalone project
set(MAIN_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MAIN_PROJECT ON)
endif()

#TODO: move to build tools
# checking an OS which we build for and setting flags
if (WIN32)
message(STATUS "OS: WINDOWS")
add_definitions(-DWIN32)
elseif (UNIX AND NOT APPLE)
message(STATUS "OS: LINUX")
add_definitions(-DLINUX)
set(LINUX True)
endif()

#TODO: move to build tools
# checking build type and setting appropriate flags
if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
message(STATUS "SET DEBUG_MODE")
add_definitions(-DDEBUG_MODE)
elseif (${CMAKE_BUILD_TYPE} STREQUAL Release)
message(STATUS "SET RELEASE")
add_definitions(-DNDEBUG)
endif()
check_main_project()
check_build()

###
# CONFIG
# CONFIGURATION
###

# sourcing configuration
Expand All @@ -51,5 +26,6 @@ configure_file(ObpsLogConfig.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/ObpsLogConfi

import_repo(data_structures https://github.com/JekasObps/obps-data-structures.git main)

import_gtest()
enable_testing(on)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
5 changes: 5 additions & 0 deletions ObpsLogConfig.hpp.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*******************************************************************************
* Generated by cmake from ObpsLogConfig.hpp.in *
*******************************************************************************/
#pragma once

#define ObpsLog_VERSION_MAJOR @ObpsLog_VERSION_MAJOR@
#define ObpsLog_VERSION_MINOR @ObpsLog_VERSION_MINOR@

Expand Down
5 changes: 5 additions & 0 deletions src/ObpsLogConfig.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*******************************************************************************
* Generated by cmake from ObpsLogConfig.hpp.in *
*******************************************************************************/
#pragma once

#define ObpsLog_VERSION_MAJOR 1
#define ObpsLog_VERSION_MINOR 0

Expand Down

0 comments on commit 0b72f30

Please sign in to comment.