开发者

how to create pre install rule for cmake

I need to check, that user commited all changes to svn before installing project. I tries to use:

INSTALL(CODE "exec_program(python ARGS \${TC_BUILD_ROOT}/bin/tc_check_uncommited.py ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE POST_INST_OUT RETURN_VALUE POST_INST_RES)")

But it is not helps. Changing to execute_process does not helps add_custom_target does not helps too:

add_custom_target(checkUncommited ALL COMMAND python ${TC_BUILD_ROOT}/bin/tc_check_uncommited.py ${CMAKE_CURRENT_SOURCE_DIR})
开发者_开发知识库

In this case this target always failed for uncommited source, even if i only build project (not installing).

tc_check_uncommited.py is a simple script, that returns non-zero if sources is not commited.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜