Skip to content

Commit f42f7ae

Browse files
committed
Fix compilation errors on CentOS Stream 8
1 parent ce16868 commit f42f7ae

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ option(USE_PRIVATE_NLOHMANN_JSON "Should we use a private copy of nlohmann::json
8585
if(USE_PRIVATE_NLOHMANN_JSON)
8686
include(FetchContent)
8787
FetchContent_Declare(json
88-
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
89-
DOWNLOAD_EXTRACT_TIMESTAMP true)
88+
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
9089
FetchContent_MakeAvailable(json)
9190
else()
9291
find_package(nlohmann_json 3.2.0 REQUIRED)

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ software.
2121
See the [release notes](./CHANGELOG.md) for details about
2222
the current release.
2323

24-
relaunchd aims to support the following platforms:
25-
* FreeBSD 9, 10, and 11-CURRENT
26-
* OpenBSD 5.8
27-
* NetBSD 7.0
28-
* Linux (various flavors)
24+
relaunchd has been built on the following platforms:
25+
* OpenBSD 7.2
26+
* CentOS Stream 8
27+
* Alpine Linux
28+
* Ubuntu Linux
29+
* MacOS Ventura
2930

3031
The core functionality is working:
3132
* loading and unloading jobs with launchctl
@@ -67,6 +68,15 @@ invocation:
6768
```
6869
-DUSE_PRIVATE_NLOHMANN_JSON=YES
6970
```
71+
72+
If you are using an older version of GCC, such as the one
73+
found in CentOS Stream 8, you will need to enable linking
74+
against the external std::filesystem library. Add the following
75+
flag to your CMake invocation:
76+
```
77+
-DUSE_EXTERNAL_CXX17_FILESYSTEM=YES
78+
```
79+
7080
The basic commands to build and install the software are:
7181
```
7282
mkdir cmake-build-debug

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ if (USE_PRIVATE_DEPENDENCIES)
3131
endif ()
3232
add_library(launch STATIC ${LAUNCH_SRC})
3333
target_link_libraries(launch PRIVATE nlohmann_json::nlohmann_json)
34+
if (USE_EXTERNAL_CXX17_FILESYSTEM)
35+
target_link_libraries(launch PRIVATE stdc++fs)
36+
endif ()
3437

3538
if (NOT USE_PRIVATE_DEPENDENCIES)
3639
# we register libtinyxml2 as a public dependency of liblaunch

0 commit comments

Comments
 (0)