Answer the question
In order to leave comments, you need to log in
How not to rebuild a dependency when building a project in cmake?
There is a lib and a project that uses it. I can add it to the assembly through a subdirectory. But the problem is that when I make changes to the cmake project, it goes through the new one, in which there are no changes, respectively. How can I make cmake just build the project and just link the lib to the project? In fact, I just need to check the existence of a lib. I tried this: if(NOT EXIST path/to/lib.a) //adding a lib through the subdirectory It sees the existence of the file, but one fig time is not reduced and the method is clumsy. For example, when I add some lib through find_package, it does not rebuild it every time and the project build is fast.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question