scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

`tool.scikit-build.cmake.build-type` does not not work for windows platform.

Open hzhangxyz opened this issue 1 year ago • 2 comments
trafficstars

I have already set build-type to "Release", but I got empty string when message(STATUS ${CMAKE_BUILD_TYPE}) in windows. Although this can be temperarily fixed by setting define.CMAKE_BUILD_TYPE of course, but I think it is a bug for cmake.build-type

hzhangxyz avatar Dec 17 '23 08:12 hzhangxyz

Windows uses a multi config generator (MSVC), so you can’t use CMAKE_BUILD_TYPE. You need to use generator expressions if you want to change behavior.

scikit-build-core uses cmake --build <path> --config Release when building.

henryiii avatar Dec 17 '23 13:12 henryiii

Windows uses a multi config generator (MSVC), so you can’t use CMAKE_BUILD_TYPE. You need to use generator expressions if you want to change behavior.

Ohh, I have passed -GNinja to SKBUILD_CMAKE_ARGS...

hzhangxyz avatar Dec 19 '23 07:12 hzhangxyz