File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ def cmake_c_compiler = System.getenv("CMAKE_C_COMPILER") ?: "gcc"
29
29
def cmake_cxx_compiler = System . getenv(" CMAKE_CXX_COMPILER" ) ?: " g++"
30
30
def lib_gcc_path = System . getenv(" GCC_LIB_Path" ) ?: " "
31
31
32
+ static boolean isWindows () {
33
+ return System . getProperty(' os.name' ). toLowerCase(). contains(' windows' )
34
+ }
35
+
32
36
tasks. register(' createBuildDir' ) {
33
37
doLast {
34
38
mkdir(layout. buildDirectory. get(). asFile)
@@ -38,6 +42,7 @@ tasks.register('createBuildDir') {
38
42
39
43
tasks. register(' config_cmake' ) {
40
44
dependsOn createBuildDir
45
+ String gen = isWindows() ? " -G CodeBlocks - MinGW Makefiles" : " "
41
46
doLast {
42
47
exec {
43
48
commandLine " cmake" ,
@@ -46,6 +51,7 @@ tasks.register('config_cmake') {
46
51
" -DCMAKE_CXX_COMPILER=$cmake_cxx_compiler " ,
47
52
" -DGCC_LIB_PATH=$lib_gcc_path " ,
48
53
" -DTARGET_OS=$targetOS " ,
54
+ gen,
49
55
" -S" , cmake_path,
50
56
" -B" , path_to_build
51
57
}
You can’t perform that action at this time.
0 commit comments