From c7aae797541c5efcf10c82f2f0c9f51919acdffa Mon Sep 17 00:00:00 2001 From: Philip Top Date: Sun, 5 Sep 2021 05:35:44 -0700 Subject: [PATCH] upgrade the units library to 0.5.0 (#2095) * upgrade the units library to 0.5.0 * Automated formatting of repo files (#2096) Co-authored-by: Philip Top 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> --- CHANGELOG.md | 13 +++++++++++++ CMakeLists.txt | 10 +++++----- ThirdParty/units | 2 +- config/cmake/addUnits.cmake | 2 +- src/helics/core/CommonCore.cpp | 3 ++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a34eea463b..ec6f1c669a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/CMakeLists.txt b/CMakeLists.txt index cb17ab8efd..9f01ae2e1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -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}" @@ -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 diff --git a/ThirdParty/units b/ThirdParty/units index 63ff891679..052f57a5c8 160000 --- a/ThirdParty/units +++ b/ThirdParty/units @@ -1 +1 @@ -Subproject commit 63ff89167919c1fe05caaf03c329026ea06f805b +Subproject commit 052f57a5c87ee15f4a17884a4e392824c3d93490 diff --git a/config/cmake/addUnits.cmake b/config/cmake/addUnits.cmake index 8234fd36cc..1d4fe7e435 100644 --- a/config/cmake/addUnits.cmake +++ b/config/cmake/addUnits.cmake @@ -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) diff --git a/src/helics/core/CommonCore.cpp b/src/helics/core/CommonCore.cpp index f4dff12d2b..6afecb0522 100644 --- a/src/helics/core/CommonCore.cpp +++ b/src/helics/core/CommonCore.cpp @@ -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; }