Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,29 @@ jobs:
build:
strategy:
matrix:
name: [ linux ]
name: [ linux-gcc-c++17,
linux-gcc-c++20,
linux-clang-c++17,
linux-clang-c++20 ]
include:
- name: linux
- name: linux-gcc-c++17
compiler: gcc
std: c++17
os: ubuntu-latest

- name: linux-gcc-c++20
compiler: gcc
std: c++20
os: ubuntu-latest

- name: linux-clang-c++17
compiler: clang
std: c++17
os: ubuntu-latest

- name: linux-clang-c++20
compiler: clang
std: c++20
os: ubuntu-latest

runs-on: ${{ matrix.os }}
Expand All @@ -26,7 +46,7 @@ jobs:

- name: Install
run: |
sudo apt-get install -y ccache
sudo apt-get install -y ccache meson cmake

- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
Expand All @@ -35,7 +55,22 @@ jobs:
restore-keys: |
${{ matrix.name }}

- name: Build and install
- name: Set variables
run: |
if [ "${{ matrix.compiler }}" = clang ] ; then
echo CC=clang >> $GITHUB_ENV
echo CXX=clang++ >> $GITHUB_ENV
fi
echo CXXFLAGS=-std=${{ matrix.std }} >> $GITHUB_ENV

- name: Build and test with meson
run: |
meson setup mbuild
cd mbuild
ninja
ninja test

- name: Build and install and test with cmake
run: |
./bootstrap.sh
cd ../
Expand Down
82 changes: 41 additions & 41 deletions ncl/ncl.h
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
// Copyright (C) 1999-2003 Paul O. Lewis
// Copyright (C) 1999-2003 Paul O. Lewis
//
// This file is part of NCL (Nexus Class Library) version 2.0.
// This file is part of NCL (Nexus Class Library) version 2.0.
//
// NCL is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// NCL is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// NCL is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// NCL is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with NCL; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// You should have received a copy of the GNU General Public License
// along with NCL; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//

#ifndef NCL_NCL_H
#define NCL_NCL_H

#if !defined(__DECCXX)
# include <cctype>
# include <cmath>
# include <cstdarg>
# include <cstdio>
# include <cstdarg>
# include <cstdlib>
# include <ctime>
# include <climits>
# include <cfloat>
# include <cctype>
# include <cmath>
# include <cstdarg>
# include <cstdio>
# include <cstdarg>
# include <cstdlib>
# include <ctime>
# include <climits>
# include <cfloat>
#else
# include <ctype.h>
# include <stdarg.h>
# include <math.h>
# include <stdarg.h>
# include <stdio.h>
# include <stdlib.h>
# include <time.h>
# include <float.h>
# include <ctype.h>
# include <stdarg.h>
# include <math.h>
# include <stdarg.h>
# include <stdio.h>
# include <stdlib.h>
# include <time.h>
# include <float.h>
#endif

#include <algorithm>
Expand All @@ -51,27 +51,27 @@
#include <stdexcept>
#include <string>
#if defined(__GNUC__)
# if __GNUC__ < 3
# include <strstream>
# else
# include <sstream>
# endif
# if __GNUC__ < 3
# include <strstream>
# else
# include <sstream>
# endif
#endif
#include <vector>

# if ! defined (NCL_AVOID_USING_STD)
using namespace std;
using namespace std;
#endif

#if defined( __BORLANDC__ )
# include <dos.h>
# include <dos.h>
#endif

#if defined(__MWERKS__)
# define HAVE_PRAGMA_UNUSED
// mwerks (and may be other compilers) want return values even if the function throws an exception
//
# define DEMANDS_UNREACHABLE_RETURN
# define HAVE_PRAGMA_UNUSED
// mwerks (and may be other compilers) want return values even if the function throws an exception
//
# define DEMANDS_UNREACHABLE_RETURN

#endif

Expand Down
Loading