diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-08-01 17:28:04 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-08-01 17:28:04 -0400 |
| commit | ae7e928f88370124406da09ec9a2a410d3754656 (patch) | |
| tree | a5b1729474817ef9c56046fa6540840e31a9b8c9 | |
| download | see_defs-ae7e928f88370124406da09ec9a2a410d3754656.tar.gz | |
Initial commit
| -rw-r--r-- | .github/workflows/cmake-multi-platform.yml | 39 | ||||
| -rw-r--r-- | main.c | 19 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml new file mode 100644 index 0000000..b4137b5 --- /dev/null +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,39 @@ +name: CMake on multiple platforms + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + + matrix: + os: [ubuntu-latest, macos-latest] + build_type: [RelWithDebInfo] + c_compiler: [gcc, clang] + include: + - os: macos-latest + c_compiler: clang + - os: ubuntu-latest + c_compiler: gcc + - os: ubuntu-latest + c_compiler: clang + exclude: + - os: macos-latest + c_compiler: gcc + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Build + run: | + ${{ matrix.c_compiler }} -v -Wall -Wextra -o see_defs main.c + + - name: Test + run: ./see_defs @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <sys/cdefs.h> + +int main(int argc, char *argv[]) { +#ifdef _XOPEN_SOURCE + printf("_XOPEN_SOURCE = %luL\n", _XOPEN_SOURCE); +#endif + +#ifdef _POSIX_C_SOURCE + printf("_POSIX_C_SOURCE = %luL\n", _POSIX_C_SOURCE); +#endif + +#ifdef __DARWIN_C_LEVEL + printf("__DARWIN_C_LEVEL = %luL\n", __DARWIN_C_LEVEL); +#endif + + return 0; +} + |
