Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake ExternalProject_Add rebuilds every time

I have OpenSSL as a part of my CMake project. Since it does not have its own CMake file I build it as an ExternalProject. Unfortunately every time I rebuild my project the ExternalProject is also rebuilt and it is the biggest and slowest part by far.

How can I avoid that ExternalProject is being rebuilt every time?

I tried BUILD_ALWAYS = false but it did not help. OpenSSL has to be built from sources as a static library.

like image 872
Nikolay Kovalenko Avatar asked Oct 16 '25 18:10

Nikolay Kovalenko


1 Answers

Add empty UPDATE_COMMAND:

ExternalProject_Add(
  ...
  UPDATE_COMMAND ""
  ...
)
like image 118
veigo Avatar answered Oct 18 '25 10:10

veigo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!