diff --git a/.github/workflows/cff-validator.yml b/.github/workflows/cff-validator.yml index e0764a0..83c4c38 100644 --- a/.github/workflows/cff-validator.yml +++ b/.github/workflows/cff-validator.yml @@ -22,6 +22,6 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Validate CITATION.cff - uses: dieghernan/cff-validator@v4 + uses: dieghernan/cff-validator@v5 diff --git a/.github/workflows/ctest.yml b/.github/workflows/ctest.yml index dee5d49..073f23f 100644 --- a/.github/workflows/ctest.yml +++ b/.github/workflows/ctest.yml @@ -18,12 +18,14 @@ jobs: name: ${{ matrix.os }} / ${{ matrix.architecture }} / CMake ${{ matrix.cmakeVersion }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest - - macos-latest # Apple - - macos-13 # Intel - - windows-latest + - macos-latest # Apple + - macos-15-intel # Intel + - windows-2022 # Visual Studio 2022 + - windows-latest # Visual Studio 2026, CMake >= 4.2 is required architecture: [arm64, x64, x86] cmakeVersion: ["3.21", latest] # CMake >= 3.21 is required to use "--preset " and discover generators exclude: @@ -31,19 +33,23 @@ jobs: architecture: x86 - os: macos-latest architecture: x64 - - os: macos-13 + - os: macos-15-intel architecture: x86 - - os: macos-13 + - os: macos-15-intel architecture: arm64 - os: windows-latest architecture: arm64 + - os: windows-2022 + architecture: arm64 - os: ubuntu-latest architecture: arm64 - os: ubuntu-latest architecture: x86 + - os: windows-latest + cmakeVersion: "3.21" steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Clone required submodules run: | diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index c5ee894..9d519a8 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Clone doxygen-awesome-css submodule run: | @@ -31,14 +31,14 @@ jobs: git submodule update - name: Install Doxygen - uses: ssciwr/doxygen-install@v1 + uses: ssciwr/doxygen-install@v2 with: - version: "1.12.0" + version: "1.17.0" - name: Setup GitHub Pages if: ${{ github.event_name == 'release' }} id: pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@v6 - name: Install CMake uses: lukka/get-cmake@latest @@ -50,7 +50,7 @@ jobs: buildPreset: docsOnly - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 if: ${{ github.event_name == 'release' }} with: path: ./docs/html/ @@ -69,4 +69,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bdd0b2..e84988d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: relName: Linux x64 steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install CMake # (latest stable version) uses: lukka/get-cmake@latest @@ -54,7 +54,7 @@ jobs: - name: Upload release artifacts (binaries) if: runner.os != 'Windows' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "${{ github.event.repository.name }}-release-${{ runner.os }}" path: | @@ -67,7 +67,7 @@ jobs: - name: Upload release artifact (Windows) if: runner.os == 'Windows' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "${{ github.event.repository.name }}-release-${{ runner.os }}-${{ matrix.architecture }}" path: | @@ -78,7 +78,7 @@ jobs: - name: Upload release artifact (C++ Header) if: runner.os == 'Linux' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "${{ github.event.repository.name }}-release-cpp-header" path: ${{ github.workspace }}/include/LFMF.h diff --git a/app/src/CMakeLists.txt b/app/src/CMakeLists.txt index 9ceaab1..bb657fb 100644 --- a/app/src/CMakeLists.txt +++ b/app/src/CMakeLists.txt @@ -27,9 +27,7 @@ configure_proplib_target(${DRIVER_NAME}) # Add definitions to enable version identification inside the driver add_compile_definitions( - LIBRARY_VERSION="${PROJECT_VERSION}" DRIVER_VERSION="${DRIVER_VERSION}" - LIBRARY_NAME="${LIB_NAME}" DRIVER_NAME="${DRIVER_NAME}" ) diff --git a/app/src/Driver.cpp b/app/src/Driver.cpp index 76df299..bc62930 100644 --- a/app/src/Driver.cpp +++ b/app/src/Driver.cpp @@ -63,8 +63,8 @@ int main(int argc, char **argv) { } // Print generator information to file - fp << std::left << std::setw(30) << "Model" << LIBRARY_NAME; - fp PRINT "Library Version" << "v" << LIBRARY_VERSION; + fp << std::left << std::setw(30) << "Model" << GetLibraryName(); + fp PRINT "Library Version" << "v" << GetLibraryVersion(); fp PRINT "Driver Version" << "v" << DRIVER_VERSION; fp PRINT "Date Generated" << GetDatetimeString(); fp PRINT "Input Arguments"; diff --git a/app/src/DriverUtils.cpp b/app/src/DriverUtils.cpp index fe9f69b..dcde1d8 100644 --- a/app/src/DriverUtils.cpp +++ b/app/src/DriverUtils.cpp @@ -145,7 +145,7 @@ void Version(std::ostream &os) { os << std::setfill('*') << std::setw(55) << "" << std::endl; os << "Institute for Telecommunication Sciences - Boulder, CO" << std::endl; os << "\tDriver Version: " << DRIVER_VERSION << std::endl; - os << "\t" << LIBRARY_NAME << " Version: " << LIBRARY_VERSION << std::endl; + os << "\t" << GetLibraryName() << " Version: " << GetLibraryVersion() << std::endl; os << "Time: " << GetDatetimeString() << std::endl; os << std::setfill('*') << std::setw(55) << "" << std::endl; } diff --git a/include/LFMF.h b/include/LFMF.h index 08aab52..42bbffd 100644 --- a/include/LFMF.h +++ b/include/LFMF.h @@ -139,6 +139,8 @@ DLLEXPORT ReturnCode LFMF( DLLEXPORT char *GetReturnStatusCharArray(const int code); DLLEXPORT void FreeReturnStatusCharArray(char *c_msg); +DLLEXPORT char *GetLibraryNameCharArray(); +DLLEXPORT char *GetLibraryVersionCharArray(); //////////////////////////////////////////////////////////////////////////////// // Private Functions @@ -156,6 +158,8 @@ ReturnCode LFMF_CPP( Result &result ); std::string GetReturnStatus(const int code); +std::string GetLibraryName(); +std::string GetLibraryVersion(); double FlatEarthCurveCorrection( const std::complex delta, const std::complex q, diff --git a/src/ReturnCodes.cpp b/src/ReturnCodes.cpp index 05dfcf1..16fe162 100644 --- a/src/ReturnCodes.cpp +++ b/src/ReturnCodes.cpp @@ -22,6 +22,24 @@ namespace ITS { namespace Propagation { namespace LFMF { +/******************************************************************************* + * Get library name + * + * @return Library name. + ******************************************************************************/ +std::string GetLibraryName() { + return LIBRARY_NAME; +} + +/******************************************************************************* + * Get library version + * + * @return Library version. + ******************************************************************************/ +std::string GetLibraryVersion() { + return LIBRARY_VERSION; +} + /******************************************************************************* * Get an error message string from a return code. * @@ -86,6 +104,38 @@ void FreeReturnStatusCharArray(char *c_msg) { delete[] c_msg; } +/******************************************************************************* + * Get library name string (as C-style string). + * + * @return Library name string. + ******************************************************************************/ +char *GetLibraryNameCharArray() { + const std::string msg = LIBRARY_NAME; + char *c_msg = new char[msg.size() + 1]; +#ifdef _WIN32 + strcpy_s(c_msg, msg.size() + 1, msg.c_str()); +#else + strcpy(c_msg, msg.c_str()); +#endif + return c_msg; +} + +/******************************************************************************* + * Get library version string (as C-style string). + * + * @return Library version string. + ******************************************************************************/ +char *GetLibraryVersionCharArray() { + const std::string msg = LIBRARY_VERSION; + char *c_msg = new char[msg.size() + 1]; +#ifdef _WIN32 + strcpy_s(c_msg, msg.size() + 1, msg.c_str()); +#else + strcpy(c_msg, msg.c_str()); +#endif + return c_msg; +} + } // namespace LFMF } // namespace Propagation } // namespace ITS