dweiss commented on a change in pull request #2068:
URL: https://github.com/apache/lucene-solr/pull/2068#discussion_r523722104
##########
File path: gradle/native/disable-native.gradle
##########
@@ -17,20 +17,65 @@
// This is the master switch to disable all tasks that compile
// native (cpp) code.
-def buildNative = propertyOrDefault("build.native", true).toBoolean()
+rootProject.ext {
+ buildNative = propertyOrDefault("build.native", true).toBoolean()
+}
+
+// Explicitly list all projects that should be configured for native
extensions.
+// We could scan for projects with a the cpp-library plugin but this is faster.
+def nativeProjects = allprojects.findAll {it.path in [
+ ":lucene:misc:native"
+]}
+
+def javaProjectsWithNativeDeps = allprojects.findAll {it.path in [
+ ":lucene:misc"
+]}
+
+// Set up defaults for projects with native dependencies.
+configure(javaProjectsWithNativeDeps, {
+ configurations {
Review comment:
This is something I considered but eventually left out. Technically,
it's trivial to do but my concern is that then the content of the "lucene
distribution" depends on the machine you build it on - native libraries will
vary and you can't (?) easily compile all libraries for the most common
platforms to include all of them in the distribution... I don't know how to
solve it.
Unless those native extensions offer super performance boosts I'd rather
treat them as "sandbox", expert-level stuff and not include them in the
distribution by default? You can bring this issue up on the dev list, perhaps
other people have an opinion here - I have never used those extensions myself.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]