Repository: lucy Updated Branches: refs/heads/master a15a9d747 -> 25d664cdc
Compile as C with MSVC 12 Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/25d664cd Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/25d664cd Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/25d664cd Branch: refs/heads/master Commit: 25d664cdce24cc4d97e6c52e41243d17699344fe Parents: db66794 Author: Nick Wellnhofer <[email protected]> Authored: Tue Jun 2 21:18:20 2015 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Jul 27 18:43:40 2015 +0200 ---------------------------------------------------------------------- common/charmonizer.c | 17 +++++++---------- common/charmonizer.main | 6 ++++-- 2 files changed, 11 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/25d664cd/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/common/charmonizer.c b/common/charmonizer.c index 929a839..d3c3dc3 100644 --- a/common/charmonizer.c +++ b/common/charmonizer.c @@ -784,7 +784,7 @@ chaz_MakeFile_add_lemon_grammar(chaz_MakeFile *makefile, * @param obj The object file. * @param cflags Compiler flags. */ -chaz_MakeRule* +void chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj, chaz_CFlags *cflags); @@ -4881,7 +4881,7 @@ chaz_MakeFile_add_lemon_grammar(chaz_MakeFile *makefile, return rule; } -chaz_MakeRule* +void chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj, chaz_CFlags *cflags) { const char *obj_ext = chaz_CC_obj_ext(); @@ -4920,8 +4920,6 @@ chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj, free(command); free(src); - - return rule; } void @@ -5089,10 +5087,7 @@ chaz_MakeRule_add_command_with_libpath(chaz_MakeRule *rule, path = chaz_Util_vjoin(";", args); va_end(args); - /* It's important to not add a space before `&&`. Otherwise, the - * space is added to the search path. - */ - lib_command = chaz_Util_join("", "path ", path, ";%path%&& ", command, + lib_command = chaz_Util_join("", "path ", path, ";%path% && ", command, NULL); } else { @@ -8100,8 +8095,10 @@ S_add_compiler_flags(struct chaz_CLI *cli) { chaz_CFlags_append(extra_cflags, "-std=gnu99 -D_GNU_SOURCE"); } else if (chaz_Probe_msvc_version_num()) { - /* Compile as C++ under MSVC. */ - chaz_CFlags_append(extra_cflags, "/TP"); + if (chaz_Probe_msvc_version_num() < 1800) { + /* Compile as C++ under MSVC11 and below. */ + chaz_CFlags_append(extra_cflags, "/TP"); + } chaz_CFlags_append(extra_cflags, "/W3"); /* Thwart stupid warnings. */ http://git-wip-us.apache.org/repos/asf/lucy/blob/25d664cd/common/charmonizer.main ---------------------------------------------------------------------- diff --git a/common/charmonizer.main b/common/charmonizer.main index 0ec90b8..991593b 100644 --- a/common/charmonizer.main +++ b/common/charmonizer.main @@ -213,8 +213,10 @@ S_add_compiler_flags(struct chaz_CLI *cli) { chaz_CFlags_append(extra_cflags, "-std=gnu99 -D_GNU_SOURCE"); } else if (chaz_Probe_msvc_version_num()) { - /* Compile as C++ under MSVC. */ - chaz_CFlags_append(extra_cflags, "/TP"); + if (chaz_Probe_msvc_version_num() < 1800) { + /* Compile as C++ under MSVC11 and below. */ + chaz_CFlags_append(extra_cflags, "/TP"); + } chaz_CFlags_append(extra_cflags, "/W3"); /* Thwart stupid warnings. */
