From c859347325519971644d3113ec283d17c25f82d5 Mon Sep 17 00:00:00 2001 From: Anandraj Govindan Date: Mon, 26 Sep 2022 12:33:36 -0700 Subject: [PATCH] CMake on Windows uses "Visual Studio **" generator when available. "Visual Studio **" generators are multi-configuraiton (https://cgold.readthedocs.io/en/latest/glossary/multi-config.html), which requires the hermes cli and hermes runtime build flavors to be compatible. Using the "MakeFile" generator will avoid the requirement and keeps the gradle script simpler. Please note that the "Makefile" generator is the default when only "Visual Studio Community edition" is available. --- ReactAndroid/hermes-engine/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/hermes-engine/build.gradle b/ReactAndroid/hermes-engine/build.gradle index 79a260b1fc578c..07ae7a3a85ae6e 100644 --- a/ReactAndroid/hermes-engine/build.gradle +++ b/ReactAndroid/hermes-engine/build.gradle @@ -86,7 +86,7 @@ task unzipHermes(dependsOn: downloadHermes, type: Copy) { task configureBuildForHermes(type: Exec) { workingDir(hermesDir) - commandLine(windowsAwareCommandLine(findCmakePath(cmakeVersion), "-S", ".", "-B", hermesBuildDir.toString(), "-DJSI_DIR=" + jsiDir.absolutePath)) + commandLine(windowsAwareCommandLine(findCmakePath(cmakeVersion), Os.isFamily(Os.FAMILY_WINDOWS) ? "-GNMake Makefiles" : "", "-S", ".", "-B", hermesBuildDir.toString(), "-DJSI_DIR=" + jsiDir.absolutePath)) } task buildHermes(dependsOn: configureBuildForHermes, type: Exec) {