Skip to content

Commit

Permalink
"std filsystem linking for older compilers; updates #255"
Browse files Browse the repository at this point in the history
  • Loading branch information
martukas committed Oct 14, 2021
1 parent 249bb0e commit 6477340
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ target_link_libraries(
PRIVATE ${PROJECT_NAME}_producers
PRIVATE ${PROJECT_NAME}_consumers
)

# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)

6 changes: 6 additions & 0 deletions source/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ target_link_libraries(
Qt5::PrintSupport
Qt5::Network
)

# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)

0 comments on commit 6477340

Please sign in to comment.