summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/HDFLibMacros.cmake8
-rw-r--r--config/cmake/HDFMacros.cmake20
-rw-r--r--config/cmake/libhdf5.settings.cmake.in2
3 files changed, 15 insertions, 15 deletions
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
index b3985d5..282fe0c 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -88,7 +88,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
-DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
@@ -110,7 +110,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
-DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
@@ -166,7 +166,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
-DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
@@ -187,7 +187,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
-DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index 5ac7316..938b876 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -14,8 +14,15 @@
macro (SET_HDF_BUILD_TYPE)
get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if (_isMultiConfig)
- set (HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
- set (HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR})
+ set_property (CACHE CMAKE_CONFIGURATION_TYPES PROPERTY STRINGS "Debug" "Release"
+ "MinSizeRel" "RelWithDebInfo" "Developer" FORCE)
+ if (CMAKE_BUILD_TYPE)
+ set (HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
+ set (HDF_BUILD_TYPE ${CMAKE_BUILD_TYPE})
+ else ()
+ set (HDF_CFG_NAME "RelWithDebInfo")
+ set (HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR})
+ endif ()
set (HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME})
else ()
set (HDF_CFG_BUILD_TYPE ".")
@@ -27,13 +34,6 @@ macro (SET_HDF_BUILD_TYPE)
set (HDF_BUILD_TYPE "Release")
endif ()
endif ()
- if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message (VERBOSE "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" "Developer")
- endif ()
endmacro ()
#-------------------------------------------------------------------------------
@@ -455,7 +455,7 @@ macro (HDF_DIR_PATHS package_prefix)
)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
- set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
+ set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME})
set (CMAKE_PDB_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
)
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index f2cf6c0..00ae980 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -13,7 +13,7 @@ General Information:
Compiling Options:
------------------
- Build Mode: @CMAKE_BUILD_TYPE@
+ Build Mode: @HDF_CFG_NAME@
Debugging Symbols: @HDF5_ENABLE_SYMBOLS@
Asserts: @HDF5_ENABLE_ASSERTS@
Profiling: @HDF5_ENABLE_PROFILING@