Skip to content

Commit

Permalink
add version macros
Browse files Browse the repository at this point in the history
  • Loading branch information
yixuan committed Jun 5, 2020
1 parent 4b97a1c commit a97bf20
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [Unreleased]
### Added
- Added version macros `SPECTRA_MAJOR_VERSION`, `SPECTRA_MINOR_VERSION`,
`SPECTRA_PATCH_VERSION`, and `SPECTRA_VERSION` that are included by all eigen solvers

### Changed
- **API change**: Spectra now requires C++11
- **API change**: All enumerations have been converted to enum classes
Expand Down
1 change: 1 addition & 0 deletions include/Spectra/GenEigsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <complex> // std::complex, std::conj, std::norm, std::abs
#include <stdexcept> // std::invalid_argument

#include "Util/Version.h"
#include "Util/TypeTraits.h"
#include "Util/SelectionRule.h"
#include "Util/CompInfo.h"
Expand Down
1 change: 1 addition & 0 deletions include/Spectra/SymEigsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <stdexcept> // std::invalid_argument
#include <utility> // std::move

#include "Util/Version.h"
#include "Util/TypeTraits.h"
#include "Util/SelectionRule.h"
#include "Util/CompInfo.h"
Expand Down
16 changes: 16 additions & 0 deletions include/Spectra/Util/Version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (C) 2020 Yixuan Qiu <yixuan.qiu@cos.name>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

#ifndef VERSION_H
#define VERSION_H

#define SPECTRA_MAJOR_VERSION 1
#define SPECTRA_MINOR_VERSION 0
#define SPECTRA_PATCH_VERSION 0

#define SPECTRA_VERSION (SPECTRA_MAJOR_VERSION * 10000 + SPECTRA_MINOR_VERSION * 100 + SPECTRA_PATCH_VERSION)

#endif // VERSION_H

0 comments on commit a97bf20

Please sign in to comment.