[CMake] ExternalProject_Add ALWAYS

James Turner james.turner at kdab.com
Sun Dec 1 05:53:08 EST 2013


Hi,

I am trying to force the BUILD step of an ExternalProject_Add target to be run - always. I have found several wiki articles, and references in the archives of this list, to setting an ALWAYS option for the stage I want to force to run each time. The problem is I can’t find any documentation on the exact syntax to use - can someone please enlighten me? (This is for a project where the files are on the local disk when the build is run, but may change due to external sync mechanisms - right now the build system never notices this)

I’m guessing it must be something like:

ExternalProject_Add(Foo 
   PREFIX ${CMAKE_BINARY_DIR}
   DOWNLOAD_COMMAND ""    # no need to download
   BUILD_ALWAYS # <<< but is this correct?
   SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/path/to/foo
  …...
)

Kind regards,
James Turner


More information about the CMake mailing list