Skip to content

Commit 346fc20

Browse files
authored
Added support for clang with GNU stdlib (relevant on Ubuntu 18.04 and older) (#153)
1 parent 9a67015 commit 346fc20

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/v1/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ set(gnu $<CXX_COMPILER_ID:GNU>)
9595
set(clang $<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>)
9696
set(libcxx $<AND:${clang},$<BOOL:${skyr_BUILD_WITH_LLVM_LIBCXX}>>)
9797
set(msvc $<CXX_COMPILER_ID:MSVC>)
98+
set(clang_with_gnu_stdlib $<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<BOOL:${WIN32}>>,$<NOT:$<BOOL:${skyr_BUILD_WITH_LLVM_LIBCXX}>>>)
9899

99100
target_compile_definitions(
100101
skyr-url-v1
@@ -161,6 +162,7 @@ if (skyr_ENABLE_FILESYSTEM_FUNCTIONS)
161162
INTERFACE
162163
skyr-url-v1
163164
$<${gnu}:"stdc++fs">
165+
$<${clang_with_gnu_stdlib}:"stdc++fs">
164166
)
165167

166168
target_include_directories(

src/v2/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ set(gnu $<CXX_COMPILER_ID:GNU>)
8484
set(clang $<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>)
8585
set(libcxx $<AND:${clang},$<BOOL:${skyr_BUILD_WITH_LLVM_LIBCXX}>>)
8686
set(msvc $<CXX_COMPILER_ID:MSVC>)
87+
set(clang_with_gnu_stdlib $<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<BOOL:${WIN32}>>,$<NOT:$<BOOL:${skyr_BUILD_WITH_LLVM_LIBCXX}>>>)
8788

8889
#target_compile_definitions(
8990
# skyr-url-v2
@@ -149,6 +150,7 @@ if (skyr_ENABLE_FILESYSTEM_FUNCTIONS)
149150
INTERFACE
150151
skyr-url-v2
151152
$<${gnu}:"stdc++fs">
153+
$<${clang_with_gnu_stdlib}:"stdc++fs">
152154
)
153155

154156
target_include_directories(

0 commit comments

Comments
 (0)