2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-20 04:42:24 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Klemens Morgenstern
7919c9fd0b b2 link fixes. 2024-07-12 07:52:51 +08:00
Klemens Morgenstern
2057b4e27f c++14 constexpr fixes for environment_win. 2024-07-12 07:42:52 +08:00
4 changed files with 19 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ else()
endif()
if (WIN32)
target_link_libraries(boost_process PUBLIC ntdll)
target_link_libraries(boost_process PUBLIC ntdll shell32 Advapi32 user32)
endif()
if(BUILD_SHARED_LIBS)

View File

@@ -40,11 +40,23 @@ alias process_sources
shell.cpp
;
if [ os.name ] = NT
{
lib shell32 ;
lib Advapi32 ;
lib Ntdll ;
lib user32 ;
}
lib boost_process
: process_sources
: requirements <define>BOOST_PROCESS_SOURCE=1
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost//filesystem
<target-os>windows:<library>shell32
<target-os>windows:<library>user32
<target-os>windows:<library>Ntdll
<target-os>windows:<library>Advapi32
: usage-requirements
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost//filesystem

View File

@@ -57,7 +57,7 @@ struct key_char_traits
return to_lower(c1) < to_lower(c2);
}
BOOST_CONSTEXPR static
BOOST_CXX14_CONSTEXPR static
int compare(const char_type* s1, const char_type* s2, size_t n) BOOST_NOEXCEPT
{
auto itrs = std::mismatch(s1, s1 + n, s2, &eq);
@@ -69,17 +69,17 @@ struct key_char_traits
return (c1 < c2 ) ? -1 : 1;
}
BOOST_CONSTEXPR static size_t length(const char* s) BOOST_NOEXCEPT { return std::strlen(s); }
BOOST_CONSTEXPR static size_t length(const wchar_t* s) BOOST_NOEXCEPT { return std::wcslen(s); }
static size_t length(const char* s) BOOST_NOEXCEPT { return std::strlen(s); }
static size_t length(const wchar_t* s) BOOST_NOEXCEPT { return std::wcslen(s); }
BOOST_CONSTEXPR static
BOOST_CXX14_CONSTEXPR static
const char_type* find(const char_type* s, size_t n, const char_type& a) BOOST_NOEXCEPT
{
const char_type u = to_lower(a);
return std::find_if(s, s + n, [u](char_type c){return to_lower(c) == u;});
}
BOOST_CONSTEXPR static
BOOST_CXX14_CONSTEXPR static
char_type* move(char_type* s1, const char_type* s2, size_t n) BOOST_NOEXCEPT
{
if (s1 < s2)
@@ -94,7 +94,7 @@ struct key_char_traits
return std::copy(s2, s2 + n, s1);
}
BOOST_CONSTEXPR static
BOOST_CXX14_CONSTEXPR static
char_type* assign(char_type* s, size_t n, char_type a) BOOST_NOEXCEPT
{
std::fill(s, s + n, a);

View File

@@ -43,15 +43,10 @@ exe target : target.cpp :
<target-os>windows:<source>Ntdll
;
lib test_impl : test_impl.cpp filesystem /boost//process :
<define>BOOST_PROCESS_V2_SEPARATE_COMPILATION=1
<define>BOOST_TEST_IGNORE_SIGCHLD=1
<link>static
<target-os>windows:<source>shell32
<target-os>windows:<source>user32
<target-os>windows:<source>Ntdll
<target-os>windows:<source>Advapi32
;
test-suite standalone :