Skip to content

Commit

Permalink
Setting default CMAKE_BUILD_TYPE to Release
Browse files Browse the repository at this point in the history
  • Loading branch information
killenb committed Aug 16, 2016
1 parent 3786b7f commit e044455
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(CommandLineTools)

set(${PROJECT_NAME}_MAJOR_VERSION 00)
set(${PROJECT_NAME}_MINOR_VERSION 11)
set(${PROJECT_NAME}_PATCH_VERSION 00)
set(${PROJECT_NAME}_PATCH_VERSION 01)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION})
#Note: We need the so-version because we treat it like a library, with version number in the executable name
Expand All @@ -16,6 +16,13 @@ include_directories(${mtca4u-deviceaccess_INCLUDE_DIRS})

#use -DCMAKE_BUILD_TYPE=Debug when configuring to turn on the coverage tests (and debug symbols)

# Set the build type to Release if none is specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)

#set(CMAKE_CXX_FLAGS "-Wall -g -fPIC -Wextra -Wshadow -Weffc++ -pedantic -Wuninitialized")
#skip -Weffc++ for the moment. It gives too many false positives
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${mtca4u-deviceaccess_CXX_FLAGS} -Wall -fPIC -Wextra -Wshadow -pedantic -Wuninitialized")
Expand Down

0 comments on commit e044455

Please sign in to comment.