Skip to content

Commit

Permalink
Set default CMAKE_BUILD_TYPE for imported model
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 18, 2019
1 parent 3fb1c58 commit 69211dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/CMakeLists.template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif(POLICY CMP0074)

set(default_build_type "RelWithDebInfo")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

set(MODEL_NAME mymodel)

# call project to select language and required by some modules
Expand Down

0 comments on commit 69211dc

Please sign in to comment.