Ask Your Question
0

How can INSTALL commands be excluded from the subdirectory (googletest directory) in CPack?

asked 2022-06-15 11:00:00 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-07-05 09:00:00 +0000

scrum gravatar image

To exclude INSTALL commands from the subdirectory in CPack, you can use the following command in the top-level CMakeLists.txt file:

set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_CURRENT_SOURCE_DIR}/googletest:OFF")

This command appends the googletest subdirectory to the list of projects that should not have INSTALL commands included in their package. The :OFF option explicitly sets INSTALL to OFF for the googletest project.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-06-15 11:00:00 +0000

Seen: 13 times

Last updated: Jul 05 '22