소스 검색

Match # of parallel build processes to number of CPUs for native builds

shadowislord 10 년 전
부모
커밋
373eaeae30
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      jme3-android-native/decode.gradle
  2. 1 1
      jme3-android-native/openalsoft.gradle
  3. 1 1
      jme3-bullet-native-android/build.gradle

+ 1 - 1
jme3-android-native/decode.gradle

@@ -65,7 +65,7 @@ task copySourceToBuild(type: Copy, dependsOn:[copyTremorFiles, copyStbiFiles, ge
 task buildNativeLib(type: Exec, dependsOn: copySourceToBuild) {
     workingDir decodeBuildDir
     executable rootProject.ndkCommandPath
-    args '-j8'
+    args "-j" + Runtime.runtime.availableProcessors()
 }
 
 task updatePreCompiledLibs(type: Copy, dependsOn: buildNativeLib) {

+ 1 - 1
jme3-android-native/openalsoft.gradle

@@ -86,7 +86,7 @@ task buildOpenAlSoftNativeLib(type: Exec, dependsOn: generateOpenAlSoftHeaders)
 //    println "ndkCommandPath: " + project.ndkCommandPath
     workingDir openalsoftBuildDir
     executable rootProject.ndkCommandPath
-    args '-j8'
+    args "-j" + Runtime.runtime.availableProcessors()
 }
 
 task updatePreCompiledOpenAlSoftLibs(type: Copy, dependsOn: buildOpenAlSoftNativeLib) {

+ 1 - 1
jme3-bullet-native-android/build.gradle

@@ -161,7 +161,7 @@ task buildBulletNativeLib(type: Exec, dependsOn: generateNativeHeaders) {
 //    println "buildBulletNativeLib rootProject.ndkCommandPath: " + rootProject.ndkCommandPath
     workingDir ndkWorkingPath
     executable rootProject.ndkCommandPath
-    args "-j8"
+    args "-j" + Runtime.runtime.availableProcessors()
 }
 
 //task updatePreCompiledBulletLibs(type: Copy, dependsOn: generateNativeHeaders) {