Skip to content
Snippets Groups Projects
Commit a3baa53e authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

CMake: try to set GIT version only in debug mode

parent 2b9d3967
No related branches found
No related tags found
1 merge request!65Dev tp osc
Checking pipeline status
......@@ -24,12 +24,22 @@ endif ()
set(CMAKE_MODULE_PATH ${{CMAKE_SOURCE_DIR}}/CMake/Modules)
# set(CMAKE_TEMPLATE_PATH ${{CMAKE_SOURCE_DIR}}/CMakeTemplates)
 
#########################################################
# If not specified whether Debug or Release, select debug
# cmake -DCMAKE_BUILD_TYPE=Release
# cmake -DCMAKE_BUILD_TYPE=Debug
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif ()
 
#################
# versioning
include(git)
include(versioning)
set_git_version()
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set_git_version()
endif ( )
set_version({alib_versioning_major} {alib_versioning_minor} {alib_versioning_patch})
 
######################
......@@ -37,24 +47,6 @@ set_version({alib_versioning_major} {alib_versioning_minor} {alib_versioning_pat
set(CMAKE_COLOR_MAKEFILE ON)
# set(CMAKE_VERBOSE_MAKEFILE ON)
 
#########################################################
# If not specified whether Debug or Release, select debug
# cmake -DCMAKE_BUILD_TYPE=Release
# cmake -DCMAKE_BUILD_TYPE=Debug
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif ()
#########################################################
# If not specified whether Production or not, select not
# cmake -DALIB_PRODUCTION=1
# cmake -DALIB_PRODUCTION=0
if (NOT ALIB_PRODUCTION)
set(ALIB_PRODUCTION 0)
endif ()
###########################################
# Flags according to Debug/Release decision
# - CMake uses -g on Debug implicitly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment