On 1 Dec 2013, at 10:53, James Turner <james.tur...@kdab.com> wrote:

> 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)

Following up on this: I was wrong, the problem is not needing to run the 
‘build’ step always. (I discovered this by adding the steps as Kevin suggested).

Instead, I’ve realised the problem is with the Visual Studio projects (I can 
only test 2010) - using the makefile generator on Linux, everything works as 
expected without any custom ExternalProject_Add_Step.

To make this clearer, here is the current superbuild file:

        
https://gitorious.org/fg/fgmeta/source/fe39e97c2ed376a081de8251e18bfd876621c617:CMakeLists.txt

(Containing the ExternalProject_Add_Step, but these make no difference)

When building, we have a structure as follows on Windows:

        C:\FGFS\fgmeta
                                \flightgear
                                \simgear
                                \fgrun
        (these subdirs being Git submodules, the whole of fgmeta being obtained 
via 'git clone —recursive’)
        
and:

        C:\FGFS\metabuild

I run the CMake GUI, passing 'C:\FGFS\fgmeta’ as the source dir, and 
'C:\FGFS\metabuild’ as the binary dir. When using the VS2010 generator, this 
produces something like:


        C:\FGFS\metabuild
                                \FlightGear-Meta.sln
                                … vcxproj for each ExternaProject_add in the 
superbuild CMakeList.txt …

                                \fgbuild\FlightGear.sln
                                \sgbuild\SimGear.sln

On an initial build, all is fine. The issue is that on successive builds, the 
top level -Meta.sln does not seem to descend into ‘fgbuild’, ’sgbuild' dirs at 
all; if I invoke the solutions inside those dirs manually (from the GUI or via 
msbuild.exe) they compile fine, but using msbuild or the GUI on the top-level 
solution simply says ‘nothing to be done’ for those steps.

Am I doing something wrong here that’s confusing the MSVC generator? This seems 
like a completely standard way to use External projects with MSVC, but equally 
I have no problem adjust the structure if it would simplify things. The only 
restriction is I need to keep each sub-project building cleanly outside of the 
superbuild - but I have control over them, including their Cmake files.

Kind regards,
James


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to