Source: Drop support for KWSys Encoding without std::wstring methods

This commit is contained in:
Brad King
2025-06-09 09:49:38 -04:00
parent 5ecd2acf75
commit 575106995b
4 changed files with 0 additions and 28 deletions

View File

@@ -41,7 +41,6 @@ if(WIN32)
set(KWSYS_CXX_HAS_UTIMES_COMPILED 0)
set(KWSYS_CXX_STAT_HAS_ST_MTIM_COMPILED 0)
set(KWSYS_CXX_STAT_HAS_ST_MTIMESPEC_COMPILED 0)
set(KWSYS_STL_HAS_WSTRING_COMPILED 1)
set(KWSYS_SYS_HAS_IFADDRS_H 0)
endif()
add_subdirectory(Source/kwsys)

View File

@@ -39,21 +39,13 @@ static std::string cm_archive_error_string(struct archive* a)
static void cm_archive_entry_copy_pathname(struct archive_entry* e,
std::string const& dest)
{
#if cmsys_STL_HAS_WSTRING
archive_entry_copy_pathname_w(e, cmsys::Encoding::ToWide(dest).c_str());
#else
archive_entry_copy_pathname(e, dest.c_str());
#endif
}
static void cm_archive_entry_copy_sourcepath(struct archive_entry* e,
std::string const& file)
{
#if cmsys_STL_HAS_WSTRING
archive_entry_copy_sourcepath_w(e, cmsys::Encoding::ToWide(file).c_str());
#else
archive_entry_copy_sourcepath(e, file.c_str());
#endif
}
class cmArchiveWrite::Entry

View File

@@ -378,22 +378,14 @@ extern char** environ; // NOLINT(readability-redundant-declaration)
#if !defined(CMAKE_BOOTSTRAP)
static std::string cm_archive_entry_pathname(struct archive_entry* entry)
{
# if cmsys_STL_HAS_WSTRING
return cmsys::Encoding::ToNarrow(archive_entry_pathname_w(entry));
# else
return archive_entry_pathname(entry);
# endif
}
static int cm_archive_read_open_file(struct archive* a, char const* file,
int block_size)
{
# if cmsys_STL_HAS_WSTRING
std::wstring wfile = cmsys::Encoding::ToWide(file);
return archive_read_open_filename_w(a, wfile.c_str(), block_size);
# else
return archive_read_open_filename(a, file, block_size);
# endif
}
#endif

View File

@@ -847,7 +847,6 @@ cmake_kwsys_config_replace_string ()
s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g;
s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g;
s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g;
s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g;
s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g;
}" "${INFILE}" >> "${OUTFILE}${_tmp}"
if test -f "${OUTFILE}${_tmp}"; then
@@ -1562,7 +1561,6 @@ KWSYS_NAME_IS_KWSYS=0
KWSYS_BUILD_SHARED=0
KWSYS_LFS_AVAILABLE=0
KWSYS_LFS_REQUESTED=0
KWSYS_STL_HAS_WSTRING=0
KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H=0
KWSYS_CXX_HAS_SETENV=0
KWSYS_CXX_HAS_UNSETENV=0
@@ -1597,15 +1595,6 @@ else
echo "${cmake_cxx_compiler} does not have environ in stdlib.h"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_STL_HAS_WSTRING" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
KWSYS_STL_HAS_WSTRING=1
echo "${cmake_cxx_compiler} has stl wstring"
else
echo "${cmake_cxx_compiler} does not have stl wstring"
fi
if cmake_try_run "${cmake_cxx_compiler}" \
"${cmake_cxx_flags} ${cmake_ld_flags} -DTEST_KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H" \
"${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then