summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-06-10 11:46:06 -0400
committerBrad King <brad.king@kitware.com>2009-06-10 11:46:06 -0400
commit776e21d1c7a3414aff8d307aaaef56abd907d8d5 (patch)
treebe9cf7f403df4f2e21a12df8f09321d782acbf78 /bootstrap
parent7a839be9724be4d17c746823b32aeff33c6498eb (diff)
downloadcmake-776e21d1c7a3414aff8d307aaaef56abd907d8d5.tar.gz
COMP: Avoid String.c inclusion by Compaq templates
The Compaq compiler (on VMS) includes 'String.c' in source files that use the stl string while looking for template definitions. This was the true cause of double-inclusion of the 'kwsysPrivate.h' header. We work around the problem by conditionally compiling the entire source file on a condition only true when really building the source.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap4
1 files changed, 3 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index a4509119ad..93ad54d285 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1286,6 +1286,7 @@ if [ "x${cmake_cxx_flags}" != "x" ]; then
cmake_cxx_flags="${cmake_cxx_flags} "
fi
+cmake_c_flags_String="-DKWSYS_STRING_C"
cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_source_dir}/Source\"` \
-I`cmake_escape \"${cmake_bootstrap_dir}\"`"
cmake_cxx_flags="${cmake_cxx_flags}-I`cmake_escape \"${cmake_source_dir}/Source\"` \
@@ -1305,8 +1306,9 @@ for a in ${CMAKE_C_SOURCES}; do
done
for a in ${KWSYS_C_SOURCES} ${KWSYS_C_MINGW_SOURCES}; do
src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.c"`
+ src_flags=`eval echo \\${cmake_c_flags_\${a}}`
echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
- echo " ${cmake_c_compiler} ${cmake_c_flags} -DKWSYS_NAMESPACE=cmsys -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
+ echo " ${cmake_c_compiler} ${cmake_c_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
done
for a in ${KWSYS_CXX_SOURCES}; do
src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.cxx"`