2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Add /FS flag (msvc) for parallel builds

This commit is contained in:
Jay Berkenbilt 2013-11-29 22:08:01 -05:00
parent b75b19589d
commit 88c29873e5
3 changed files with 22 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2013-11-29 Jay Berkenbilt <ejb@ql.org>
* Add /FS to msvc builds to allow parallel builds to work with
Visual C++ 2013.
* Add missing #include <algorithm> in some files that use std::min
and std::max.

View File

@ -200,7 +200,7 @@ if test "$BUILDRULES" = "msvc"; then
dnl deprecated. Removing these warnings helps people who want to
dnl write applications based on qpdf that can be Windows 8
dnl certified.
try_flags="/w14996"
try_flags="-w14996"
else
try_flags="-Wall"
fi
@ -234,7 +234,23 @@ if test "$BUILDRULES" != "msvc"; then
fi
if test "$BUILDRULES" = "msvc"; then
try_flags="/WX"
try_flags=-FS
AC_MSG_CHECKING(for whether $CC supports $try_flags)
oCFLAGS=$CFLAGS
CFLAGS="$CFLAGS $try_flags"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int a = 1; int b = a; a = b;]])],
[qpdf_USE_FS=1],[qpdf_USE_FS=0])
if test "$qpdf_USE_FS" = "1"; then
AC_MSG_RESULT(yes)
CXXFLAGS="$CXXFLAGS $try_flags"
else
AC_MSG_RESULT(no)
CFLAGS=$oCFLAGS
fi
fi
if test "$BUILDRULES" = "msvc"; then
try_flags="-WX"
else
try_flags="-Werror"
fi

View File

@ -27,7 +27,7 @@ clean::
# 1 2
# Usage: $(call compile,src,includes)
define compile
cl /nologo /Zi /Gy /EHsc /MD /TP /GR $(CPPFLAGS) $(CXXFLAGS) \
cl /nologo /O2 /Zi /Gy /EHsc /MD /TP /GR $(CPPFLAGS) $(CXXFLAGS) \
$(foreach I,$(2),-I$(I)) \
/c $(1) /Fo$(call src_to_obj,$(1))
endef