bootstrap: Add KWSys Encoding and FStream
Run the KWSYS_STL_HAS_WSTRING platform test and configure the result. Configure the Encoding and FStream header files and build the sources. On Windows, build EncodingC.c with KWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP.
This commit is contained in:
parent
f668112039
commit
2ba2c435f6
20
bootstrap
20
bootstrap
|
@ -318,11 +318,13 @@ CMAKE_C_SOURCES="\
|
||||||
|
|
||||||
if ${cmake_system_mingw}; then
|
if ${cmake_system_mingw}; then
|
||||||
KWSYS_C_SOURCES="\
|
KWSYS_C_SOURCES="\
|
||||||
|
EncodingC \
|
||||||
ProcessWin32 \
|
ProcessWin32 \
|
||||||
String \
|
String \
|
||||||
System"
|
System"
|
||||||
else
|
else
|
||||||
KWSYS_C_SOURCES="\
|
KWSYS_C_SOURCES="\
|
||||||
|
EncodingC \
|
||||||
ProcessUNIX \
|
ProcessUNIX \
|
||||||
String \
|
String \
|
||||||
System"
|
System"
|
||||||
|
@ -330,6 +332,7 @@ fi
|
||||||
|
|
||||||
KWSYS_CXX_SOURCES="\
|
KWSYS_CXX_SOURCES="\
|
||||||
Directory \
|
Directory \
|
||||||
|
EncodingCXX \
|
||||||
Glob \
|
Glob \
|
||||||
RegularExpression \
|
RegularExpression \
|
||||||
SystemTools"
|
SystemTools"
|
||||||
|
@ -337,6 +340,9 @@ KWSYS_CXX_SOURCES="\
|
||||||
KWSYS_FILES="\
|
KWSYS_FILES="\
|
||||||
auto_ptr.hxx \
|
auto_ptr.hxx \
|
||||||
Directory.hxx \
|
Directory.hxx \
|
||||||
|
Encoding.h \
|
||||||
|
Encoding.hxx \
|
||||||
|
FStream.hxx \
|
||||||
Glob.hxx \
|
Glob.hxx \
|
||||||
Process.h \
|
Process.h \
|
||||||
RegularExpression.hxx \
|
RegularExpression.hxx \
|
||||||
|
@ -479,6 +485,7 @@ cmake_kwsys_config_replace_string ()
|
||||||
s/@KWSYS_STL_HAS_ALLOCATOR_REBIND@/${KWSYS_STL_HAS_ALLOCATOR_REBIND}/g;
|
s/@KWSYS_STL_HAS_ALLOCATOR_REBIND@/${KWSYS_STL_HAS_ALLOCATOR_REBIND}/g;
|
||||||
s/@KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT@/${KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT}/g;
|
s/@KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT@/${KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT}/g;
|
||||||
s/@KWSYS_STL_HAS_ALLOCATOR_OBJECTS@/${KWSYS_STL_HAS_ALLOCATOR_OBJECTS}/g;
|
s/@KWSYS_STL_HAS_ALLOCATOR_OBJECTS@/${KWSYS_STL_HAS_ALLOCATOR_OBJECTS}/g;
|
||||||
|
s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g;
|
||||||
s/@KWSYS_CXX_HAS_CSTDDEF@/${KWSYS_CXX_HAS_CSTDDEF}/g;
|
s/@KWSYS_CXX_HAS_CSTDDEF@/${KWSYS_CXX_HAS_CSTDDEF}/g;
|
||||||
s/@KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@/${KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS}/g;
|
s/@KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@/${KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS}/g;
|
||||||
s/@KWSYS_CXX_HAS_MEMBER_TEMPLATES@/${KWSYS_CXX_HAS_MEMBER_TEMPLATES}/g;
|
s/@KWSYS_CXX_HAS_MEMBER_TEMPLATES@/${KWSYS_CXX_HAS_MEMBER_TEMPLATES}/g;
|
||||||
|
@ -1123,6 +1130,7 @@ KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE=0
|
||||||
KWSYS_STL_HAS_ALLOCATOR_REBIND=0
|
KWSYS_STL_HAS_ALLOCATOR_REBIND=0
|
||||||
KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT=0
|
KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT=0
|
||||||
KWSYS_STL_HAS_ALLOCATOR_OBJECTS=0
|
KWSYS_STL_HAS_ALLOCATOR_OBJECTS=0
|
||||||
|
KWSYS_STL_HAS_WSTRING=0
|
||||||
KWSYS_CXX_HAS_SETENV=0
|
KWSYS_CXX_HAS_SETENV=0
|
||||||
KWSYS_CXX_HAS_UNSETENV=0
|
KWSYS_CXX_HAS_UNSETENV=0
|
||||||
KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
|
KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
|
||||||
|
@ -1309,6 +1317,15 @@ else
|
||||||
echo "${cmake_cxx_compiler} does not have stl containers supporting allocator objects"
|
echo "${cmake_cxx_compiler} does not have stl containers supporting allocator objects"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if cmake_try_run "${cmake_cxx_compiler}" \
|
||||||
|
"${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_WSTRING -DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD}" \
|
||||||
|
"${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}" \
|
if cmake_try_run "${cmake_cxx_compiler}" \
|
||||||
"${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_CSTDDEF" \
|
"${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_CSTDDEF" \
|
||||||
"${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
|
"${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
|
||||||
|
@ -1516,6 +1533,9 @@ if [ "x${cmake_cxx_flags}" != "x" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake_c_flags_String="-DKWSYS_STRING_C"
|
cmake_c_flags_String="-DKWSYS_STRING_C"
|
||||||
|
if ${cmake_system_mingw}; then
|
||||||
|
cmake_c_flags_EncodingC="-DKWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP"
|
||||||
|
fi
|
||||||
cmake_cxx_flags_SystemTools="
|
cmake_cxx_flags_SystemTools="
|
||||||
-DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
|
-DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
|
||||||
-DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV}
|
-DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV}
|
||||||
|
|
Loading…
Reference in New Issue