CPack tries to build all targets

风流意气都作罢 提交于 2019-12-05 07:06:22

Per one user here, it may be possible to workaround this behaviour by lying to CPack about what CMake generator you are using.

It seems that CPack only runs the preinstall target for builds using Unix Makefiles as the CMake generator. Setting the variable CPACK_CMAKE_GENERATOR to a different generator available on your system will change CPack's behaviour, but CMake will still build using whatever generator was specified for it to use.

The user in the linked thread seems to have had luck specifying XCode as the CPack CMake generator, and I've had success specifying Ninja.

For example, you could try adding a line like set(CPACK_CMAKE_GENERATOR Ninja) so that CPack won't try to run the preinstall target.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!