$OpenBSD: patch-GPL_nativeBuildProperties_gradle,v 1.3 2020/07/19 01:29:23 lteo Exp $

Adapted from https://github.com/NationalSecurityAgency/ghidra/pull/490

Force use of Clang and honor CXX.

Index: GPL/nativeBuildProperties.gradle
--- GPL/nativeBuildProperties.gradle.orig
+++ GPL/nativeBuildProperties.gradle
@@ -39,7 +39,23 @@ model {
 			architecture 'x86_64'
 			operatingSystem 'osx'
 		}
+		openbsd64 {
+			architecture 'x86_64'
+			operatingSystem 'openbsd'
+		}
 	}	
+
+	toolChains {
+		// Force use of Clang
+		clang(Clang) {
+			eachPlatform { tools ->
+				tools.cppCompiler.executable = "${CXX}"
+				tools.linker.executable = "${CXX}"
+				println "C++ compiler is [${tools.cppCompiler.executable}]"
+				println "Linker is [${tools.linker.executable}]"
+			}
+		}
+	}
 }
 
 /*******************************************************************************************
