Skip to content

Commit a941c8e

Browse files
yuryburaklemens-morgenstern
authored andcommitted
Add BOOST_PROCESS_USE_STD_FS option
1 parent 89d2cc3 commit a941c8e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 3.5...3.16)
77

88
project(boost_process VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
99

10+
option(BOOST_PROCESS_USE_STD_FS "Use std::filesystem instead of Boost.Filesystem" OFF)
11+
1012
add_library(boost_process
1113
src/detail/environment_posix.cpp
1214
src/detail/environment_win.cpp
@@ -49,13 +51,14 @@ target_compile_definitions(boost_process
4951
PRIVATE BOOST_PROCESS_SOURCE=1
5052
)
5153

52-
if (BOOST_PROCESS_USE_STD_FS)
53-
target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_USE_STD_FS=1 )
54+
if(BOOST_PROCESS_USE_STD_FS)
55+
target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_USE_STD_FS)
56+
target_compile_features(boost_process PUBLIC cxx_std_17)
5457
else()
5558
target_link_libraries(boost_process PUBLIC Boost::filesystem)
5659
endif()
5760

58-
if (WIN32)
61+
if(WIN32)
5962
target_link_libraries(boost_process PUBLIC ntdll shell32 advapi32 user32 ws2_32)
6063
endif()
6164

0 commit comments

Comments
 (0)