created project with cmake

This commit is contained in:
Luis Stanglmeier 2022-06-23 13:44:39 +02:00
parent c4b3d8ac5f
commit 5f6abf300e
54 changed files with 412 additions and 310 deletions

View file

@ -0,0 +1,65 @@
###########################################################################################
#
# (c) Technical Software Engineering Plazotta 2019
#
# CMAKE project settings file
#
# History
# 29.09.2019 / Plazotta
# Template created.
#
#-----------------------------------------------------------------------------------------
# Macro for version parsing
#
MACRO( VERSION_STR_TO_INTS major minor patch version )
STRING( REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" ${major} ${version} )
STRING( REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+" "\\1" ${minor} ${version} )
STRING( REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" ${patch} ${version} )
ENDMACRO( VERSION_STR_TO_INTS )
#
#-----------------------------------------------------------------------------------------
# Define the global CMAKE settings
#
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#
#-----------------------------------------------------------------------------------------
# Define LINUX
#
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
else()
set(LINUX FALSE)
endif()
#
#-----------------------------------------------------------------------------------------
# Define TSEP CMAKE GENERATOR
#
message(" Generate Generator ....")
#
IF(WIN32)
set(TSEP_CMAKE_GENERATOR ${CMAKE_GENERATOR})
set(TSEP_BUILD_CONFIGURATION $(Configuration))
ENDIF()
#
IF(LINUX)
VERSION_STR_TO_INTS(GCC_MAJOR GCC_MINOR GCC_PATH ${CMAKE_CXX_COMPILER_VERSION})
set(TSEP_CMAKE_GENERATOR "Linux-gcc-")
string(APPEND TSEP_CMAKE_GENERATOR ${GCC_MAJOR})
if(CMAKE_BINARY_DIR MATCHES "(Debug*)")
set(TSEP_BUILD_CONFIGURATION "Debug")
else()
set(TSEP_BUILD_CONFIGURATION "Release")
endif()
message(" Generate Generator -> Linux ...." ${TSEP_CMAKE_GENERATOR})
ENDIF()
#
#-----------------------------------------------------------------------------------------
# handle the product/developer build variables
#
if(NOT DEFINED TSEP_PRODUCT_BUILD)
set (TSEP_PRODUCT_BUILD 0)
endif()
#-----------------------------------------------------------------------------------------
#