Skip to content

Commit

Permalink
upgrade the units library to 0.5.0 (#2095)
Browse files Browse the repository at this point in the history
* upgrade the units library to 0.5.0

* Automated formatting of repo files (#2096)

Co-authored-by: Philip Top <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
phlptp and github-actions[bot] authored Sep 5, 2021
1 parent 93b1350 commit c7aae79
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
A note on future revisions.
Everything within a major version number should be code compatible (with the exception of experimental interfaces). Everything within a single minor release should be network compatible with other federates on the same minor release number. Compatibility across minor release numbers may be possible in some situations but we are not going to guarantee this as those components are subject to performance improvements and may need to be modified at some point. Patch releases will be limited to bug fixes and other improvements not impacting the public API or network compatibility. Check the [Public API](./docs/Public_API.md) for details on what is included and excluded from the public API and version stability.

## [2.8.0][] - 2021-09-10

Final Minor release in the 2.X series of HELICS. This includes a compatibility layer for future compatibility through the "--json" flag. There may be more bug fix releases

### Changed

- Upgraded Units library to 0.5.0
- CMAKE 3.20 was tested and verified and used as the baseline version when available.

### Fixed

### Added

## [2.7.1][] - 2021-06-03

There were several bug fixes in this patch release. Some of them related to changes in [2.7.0][] and some new ones that came up from bug reports. Some new enhancements are experimental signal handlers in the C-api, which will be used in the python interface to provide a little better user experience when trying to kill a co-simulation.
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ cmake_minimum_required(VERSION 3.4)
# Make sure users don't get warnings on a tested (3.4 to 3.17) version of CMake. For most of the
# policies, the new version is better (hence the change). We don't use the 3.0...3.16 syntax because
# of a bug in MSVC 15.7 built-in and modified CMake 3.11
if(CMAKE_VERSION VERSION_LESS 3.18)
if(CMAKE_VERSION VERSION_LESS 3.20)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.18)
cmake_policy(VERSION 3.20)
endif()

# Install dependencies using vcpkg if VCPKG_ROOT is set and no CMake Toolchain file is given vcpkg
Expand All @@ -23,14 +23,14 @@ if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

project(HELICS VERSION 2.7.2)
project(HELICS VERSION 2.8.0)

# -----------------------------------------------------------------------------
# HELICS Version number
# -----------------------------------------------------------------------------
set(HELICS_VERSION_BUILD)
# use ISO date YYYY-MM-DD
set(HELICS_DATE "2021-07-30")
set(HELICS_DATE "2021-09-10")

set(HELICS_VERSION_UNDERSCORE
"${HELICS_VERSION_MAJOR}_${HELICS_VERSION_MINOR}_${HELICS_VERSION_PATCH}"
Expand Down Expand Up @@ -685,7 +685,7 @@ add_library(HELICS::spdlog ALIAS spdlog)
# Create the target for unitslib
# -----------------------------------------------------------
include(addUnits)
add_library(HELICS::units ALIAS units-static)
add_library(HELICS::units ALIAS units)

# -----------------------------------------------------------------------------
# create utilities target
Expand Down
2 changes: 1 addition & 1 deletion config/cmake/addUnits.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(UNITS_CLANG_TIDY_OPTIONS "" CACHE INTERNAL "")
add_subdirectory("${PROJECT_SOURCE_DIR}/ThirdParty/units"
"${PROJECT_BINARY_DIR}/ThirdParty/units")

set_target_properties(units-static PROPERTIES FOLDER Extern)
set_target_properties(units PROPERTIES FOLDER Extern)

hide_variable(UNITS_HEADER_ONLY)
hide_variable(UNITS_BUILD_OBJECT_LIBRARY)
3 changes: 2 additions & 1 deletion src/helics/core/CommonCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ int CommonCore::getErrorCode() const
std::string CommonCore::getErrorMessage() const
{
// used to sync threads and ensure a string is available
lastErrorCode.load();
auto lec = lastErrorCode.load();
(void)(lec);
return lastErrorString;
}

Expand Down

0 comments on commit c7aae79

Please sign in to comment.