mirror of
https://github.com/boostorg/process.git
synced 2026-01-19 04:22:15 +00:00
Add BOOST_PROCESS_USE_STD_FS option
This commit is contained in:
committed by
Klemens Morgenstern
parent
89d2cc325a
commit
a941c8e89c
@@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_process VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
option(BOOST_PROCESS_USE_STD_FS "Use std::filesystem instead of Boost.Filesystem" OFF)
|
||||
|
||||
add_library(boost_process
|
||||
src/detail/environment_posix.cpp
|
||||
src/detail/environment_win.cpp
|
||||
@@ -49,13 +51,14 @@ target_compile_definitions(boost_process
|
||||
PRIVATE BOOST_PROCESS_SOURCE=1
|
||||
)
|
||||
|
||||
if (BOOST_PROCESS_USE_STD_FS)
|
||||
target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_USE_STD_FS=1 )
|
||||
if(BOOST_PROCESS_USE_STD_FS)
|
||||
target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_USE_STD_FS)
|
||||
target_compile_features(boost_process PUBLIC cxx_std_17)
|
||||
else()
|
||||
target_link_libraries(boost_process PUBLIC Boost::filesystem)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if(WIN32)
|
||||
target_link_libraries(boost_process PUBLIC ntdll shell32 advapi32 user32 ws2_32)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user