Skip to content

Commit

Permalink
Change configuration to only search for boost filesystem if
Browse files Browse the repository at this point in the history
std::filesystem has not been found

Small fix for configuration to only try to detect and use boost
filesystem if a previous search for it in the stdlib hasn't been
successful.

Refs AdaptiveCpp#1345
  • Loading branch information
acmnpv committed Feb 17, 2024
1 parent 884ac30 commit db835e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ target_include_directories(acpp-common
target_link_libraries(acpp-common PRIVATE ${HIPSYCL_STDPAR_RT_LINKER_FLAGS})

list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake/")
find_package(Filesystem REQUIRED Final Experimental Boost)
find_package(Filesystem Final Experimental)
if(NOT Filesystem_FOUND)
# we only try to find Boost filesystem if neither the regular nor experimental std::filesystem have been found
find_package(Filesystem REQUIRED Boost)
endif()
set(CXX_FILESYSTEM_HEADER "${CXX_FILESYSTEM_HEADER}" PARENT_SCOPE)
set(CXX_FILESYSTEM_NAMESPACE "${CXX_FILESYSTEM_NAMESPACE}" PARENT_SCOPE)
list(REMOVE_AT CMAKE_MODULE_PATH 0)
Expand Down

0 comments on commit db835e3

Please sign in to comment.