Commit Graph

10 Commits (main)

Author SHA1 Message Date
Oliver Kunz d33fe262b9 We have deprecated `sapi:✌️:NullPtr` earlier this year. Users of SAPI can now pass directly a `nullptr` to the sandboxed API function. We believe that this will reduce development efforts and improve readability.
PiperOrigin-RevId: 614571112
Change-Id: I856a656d115f6cef6f9dc933e47ff6c2a7d7b722
2024-03-11 01:14:01 -07:00
Christian Blichmann 4ec1c6be64 CMake: Update policy settings to 3.26
This avoids a warning in newer CMake versions. For `CMP0083`, we still need to
explicitly select `NEW` behavior. `check_pie_supported()` will error if it is
unset even on later CMake versions.

PiperOrigin-RevId: 531200735
Change-Id: Icb17a00cac087bd6888f8a9b9f8dd837358a6090
2023-05-11 07:50:52 -07:00
Christian Blichmann 8d04efa62d contrib: Replace uses of `CHECK_NOTNULL`
Abseil's standard name for this is `ABSL_DIE_IF_NULL`.

PiperOrigin-RevId: 483648443
Change-Id: I9d6826443be72b30f71c18972436fa5f9c05048a
2022-10-25 05:50:59 -07:00
Christian Blichmann 4c87556901 Use Abseil's log/flags instead of glog/gflags
Follow-up changes might be required to fully fix up the contrib sandboxes.

PiperOrigin-RevId: 482475998
Change-Id: Iff631eb838a024b2f047a1be61bb27e35a8ff2f4
2022-10-20 06:48:51 -07:00
Christian Blichmann b11ce4b24a Add brotli and tests to CI
Drive-by:
- Update sandbox policy
- Formatting fixes
- Updated comments
PiperOrigin-RevId: 453901669
Change-Id: I40e0fbd26525ba564d4e062c79752a0102c48b15
2022-06-09 05:28:31 -07:00
Christian Blichmann 51799f99ae Introduce a transitional logging utility library
Instead of calling `google::InitGoogleLogging()` directly, introduce an
indirection via a new utility library. After this change, Sandboxed API
should consistently use `sapi::InitLogging()` everywhere.

For now, `sapi::InitLogging()` simply calls its glog equivalent. However,
this enables us to migrate away from the gflags dependency and use Abseil
flags. Once a follow-up change lands, `sapi::InitLogging()` will instead
initialize the google logging library with flags defined from Aseil.

Later still, once Abseil releases logging, we can then drop the glog
dependency entirely.

PiperOrigin-RevId: 445363592
Change-Id: Ia23a7dc88b8ffe65a422ea4d5233bba7bdd1303a
2022-04-29 02:14:06 -07:00
Christian Blichmann 839914d6dd cmake: Rename build options to follow Abseil naming
`BUILD_TESTING` is a CMake provided option and we should use similar naming,
just like how Abseil does it.

- `SAPI_ENABLE_TESTS` -> `SAPI_BUILD_TESTING`
- `SAPI_ENABLE_CONTRIB_TESTS` -> `SAPI_CONTRIB_BUILD_TESTING`
- `SAPI_ENABLE_EXAMPLES` -> `SAPI_BUILD_EXAMPLES`

Drive-by:
- Fix option name in GitHub action
PiperOrigin-RevId: 443305932
Change-Id: Ice2b42be1229a0f9ae7c2ceda9ce87187baf22c4
2022-04-21 01:17:39 -07:00
Christian Blichmann c0cfeed925 cmake: Include `CTest` in all projects, honor `BUILD_TESTING` setting
Including the `CTest` modules ensures that the `BUILD_TESTING` option is
defined and automatically calls `enable_testing()` if needed. It does not
change the default or introduce any dependencies on its own.

This follows what Abseil already does in their top-level `CMakeLists.txt`.

PiperOrigin-RevId: 443305646
Change-Id: If067c17470f497437c7748aab4aab5227c26e84f
2022-04-21 01:15:34 -07:00
Copybara-Service 5125c8fe1b Merge pull request #138 from oshogbo:brotli
PiperOrigin-RevId: 442741238
Change-Id: Ic8183c0fa74db45ecab0d677d4b901a78a98df40
2022-04-19 01:16:35 -07:00
Mariusz Zaborski dd3cb0f1b5 Sandbox brotli 2022-04-04 04:51:19 -04:00