summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-03-02 20:04:27 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-03-02 20:04:27 (GMT)
commita30da017cc0c0d981d384afad2c074ad5a65d618 (patch)
tree19bd64aba954e2ea07a2596140675054f26bfdd3
parentd269c3f9cf4004a98bf3997570d9cd609ece385c (diff)
parent9364df1c6d6d4661b6c32278268ccbe1640a082c (diff)
downloadhdf5-a30da017cc0c0d981d384afad2c074ad5a65d618.zip
hdf5-a30da017cc0c0d981d384afad2c074ad5a65d618.tar.gz
hdf5-a30da017cc0c0d981d384afad2c074ad5a65d618.tar.bz2
Merge pull request #919 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5_fork:topic_cmake_build to develop
* commit '9364df1c6d6d4661b6c32278268ccbe1640a082c': Fix CMake build type if none was specified to be cached
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 4097ca9..bdc52b9 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -27,8 +27,12 @@ macro (SET_HDF_BUILD_TYPE)
set(HDF_BUILD_TYPE "Release")
endif()
endif()
- if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release")
+ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
+ set(CMAKE_BUILD_TYPE RelWithDebInfo 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()
endmacro ()