commit df629b1d9c8024705748ff87ee95d693f12579e1
parent 2af37b84a1956b3894e2d104fd10a21b7cee5606
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 17 Jun 2021 10:02:18 +0200
Merge branch 'release_0.4.2'
Diffstat:
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
@@ -29,6 +29,12 @@ informations on CMake.
## Release notes
+### Version 0.4.2
+
+- Fix a wrong assertion on the range of the data to display: in debug `htpp`
+ was stopping and reporting an error if the data to display all had the same
+ value.
+- Fix the CMake file for MSVC build.
### Version 0.4.1
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
project(htpp C)
set(HTPP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src)
@@ -48,7 +48,13 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR})
include(rcmake)
include(rcmake_runtime)
-include_directories(${RSys_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(
+ ${RSys_INCLUDE_DIR}
+ ${StarCMap_INCLUDE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR})
+if(MSVC)
+ include_directories(${MuslGetopt_INCLUDE_DIR})
+endif()
###############################################################################
# Build subprojects
@@ -62,7 +68,7 @@ endif()
################################################################################
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
-set(VERSION_PATCH 1)
+set(VERSION_PATCH 2)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
configure_file(${HTPP_SOURCE_DIR}/htpp_version.h.in
diff --git a/src/htpp.c b/src/htpp.c
@@ -851,7 +851,7 @@ print_color_map(const struct scmap* scmap, const double range[2])
const int map_quarter = map_length / 4;
const int label_length = map_length / 4;
int i;
- ASSERT(range && range[0] < range[1]);
+ ASSERT(range && range[0] <= range[1]);
FOR_EACH(i, 0, map_length) {
const double u = (double)i / (double)(map_length-1);