To make the configuration of directory "B" rely on the build of directory "A" in CMake, we need to use the add_dependencies
command in CMake.
In the CMakeLists.txt file of directory "B", we need to add the following line:
add_dependencies(B A)
This tells CMake that the target "B" depends on the target "A" and that "A" must be built before "B".
It's important to note that "A" must be a target defined in the CMakeLists.txt file of directory "A" and that the name "A" should be replaced with the actual name of the target.
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
Asked: 2023-07-08 15:33:20 +0000
Seen: 13 times
Last updated: Jul 08 '23
How can custom-cli targets be added to the project.json file in Angular using Nx?
How can you steer clear of a target while heading towards a particular location?
Do combined media queries exist for unique viewport sizes?
Why does recv() not return SOCKET_ERROR when an ICMP message for a port unreachable is received?
What does ID2D1HwndRenderTarget::CreateBitmapFromWicBitmap() do?