Skip to content

Commit ef7c3dc

Browse files
committed
update version and add to cpack file
* error diags to cubic spline
1 parent 9ca9f3c commit ef7c3dc

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12)
88
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
99
endif()
1010

11-
project( SpecUtils VERSION 1.0.0 )
11+
project( SpecUtils VERSION 2025.1.0 )
1212
enable_testing() # Enable here to allow running `ctest` from top-most build dir
1313

1414
option( SpecUtils_ENABLE_D3_CHART "Enables exporting of the D3 chart format" ON )
@@ -539,6 +539,6 @@ endif()
539539
# Lets just use the MAJOR.MINOR version of the compiler in the name.
540540
string(REGEX MATCH "^[0-9]+\\.[0-9]+" COMPILER_VERSION_SHORT "${CMAKE_CXX_COMPILER_VERSION}")
541541

542-
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-${COMPILER_VERSION_SHORT}-${SpecUtils_PACKAGE_POSTFIX}")
542+
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-${COMPILER_VERSION_SHORT}-${SpecUtils_PACKAGE_POSTFIX}")
543543
set(CPACK_GENERATOR "ZIP")
544544
include(CPack)

src/CubicSpline.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <cassert>
2626
#include <stdexcept>
2727
#include <algorithm>
28+
#include <sstream>
2829

2930
#include "SpecUtils/CubicSpline.h"
3031

@@ -96,7 +97,12 @@ create_cubic_spline( const std::vector<std::pair<float,float>> &data,
9697
// TODO: sort input
9798
for( size_t i = 0; i < ndata - 1; ++i ) {
9899
if( data[i].first >= data[i+1].first )
99-
throw std::runtime_error( "create_cubic_spline: input data not sorted." );
100+
{
101+
std::ostringstream strm( "create_cubic_spline: input data not sorted.");
102+
strm << "i: " << i << "; data[i].first: " << data[i].first << "; data[i+1].first: " << data[i+1].first;
103+
throw std::runtime_error( strm.str() );
104+
}
105+
100106
}
101107

102108
// Create tri-diagonal matrix that we will solve for.

0 commit comments

Comments
 (0)