@@ -601,9 +601,6 @@ function _get_configs_for_mingw(package, configs, opt)
601
601
if is_subhost (" windows" ) and opt .cmake_generator ~= " Ninja" then
602
602
envs .CMAKE_MAKE_PROGRAM = _get_mingw32_make (package )
603
603
end
604
- if opt .cmake_generator == " Ninja" then
605
- envs .CMAKE_MAKE_PROGRAM = " ninja"
606
- end
607
604
_fix_cxx_compiler_cmake (package , envs )
608
605
_insert_configs_from_envs (configs , envs , opt )
609
606
end
@@ -618,12 +615,7 @@ function _get_configs_for_wasm(package, configs, opt)
618
615
assert (emscripten_cmakefile , " Emscripten.cmake not found!" )
619
616
table.insert (configs , " -DCMAKE_TOOLCHAIN_FILE=" .. emscripten_cmakefile )
620
617
if is_subhost (" windows" ) then
621
- if opt .cmake_generator == " Ninja" then
622
- local ninja = _get_ninja (package )
623
- if ninja then
624
- table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. ninja )
625
- end
626
- else
618
+ if opt .cmake_generator ~= " Ninja" then
627
619
local mingw_make = _get_mingw32_make (package )
628
620
if mingw_make then
629
621
table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. mingw_make )
@@ -783,6 +775,10 @@ function _get_configs_for_generator(package, configs, opt)
783
775
table.insert (configs , " -DCMAKE_JOB_POOL_LINK:STRING=link" )
784
776
table.insert (configs , (" -DCMAKE_JOB_POOLS:STRING=compile=%s;link=%s" ):format (jobs , linkjobs ))
785
777
end
778
+ local ninja = _get_ninja (package )
779
+ if ninja then
780
+ table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. ninja )
781
+ end
786
782
end
787
783
elseif package :is_plat (" mingw" ) and is_subhost (" msys" ) then
788
784
table.insert (configs , " -G" )
@@ -964,6 +960,7 @@ function _get_configs(package, configs, opt)
964
960
table.insert (configs , " -DCMAKE_CXX_COMPILER_LAUNCHER=" .. ccache )
965
961
end
966
962
963
+ print (" configs" , configs )
967
964
return configs
968
965
end
969
966
@@ -1312,13 +1309,16 @@ function configure(package, configs, opt)
1312
1309
table.insert (argv , " -D" .. name .. " =" .. value )
1313
1310
end
1314
1311
end
1312
+ print (" before shrink" , argv )
1315
1313
-- shrink cmake arguments, fix too long arguments
1316
1314
-- @see https://github.com/xmake-io/xmake-repo/pull/5247#discussion_r1780302212
1317
1315
_shrink_cmake_arguments (argv , oldir , opt )
1318
1316
table.insert (argv , oldir )
1319
1317
1320
1318
-- do configure
1321
1319
local cmake = assert (find_tool (" cmake" ), " cmake not found!" )
1320
+ print (argv )
1321
+ print (package :name (), package :plat (), package :arch (), opt )
1322
1322
os .vrunv (cmake .program , argv , {envs = opt .envs or buildenvs (package , opt )})
1323
1323
os .cd (oldir )
1324
1324
end
0 commit comments