[CMake] ExternalProjectDependency (artichoke) and ctest

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Fri Nov 7 20:39:29 EST 2014


Hi Jameson,

Good to know you are using Artichoke.

As you described Artichoke provides "ExternalProjectDependency", a CMake
module extending the capabilities of ExternalProject.

It could eventually by integrated into CMake once the API is stable, the
documentation is complete it is more widely adopted.

All of that said, here are few questions:

 - By using the add_custom_target/add_custom_command with POST_BUILD, is
your intent to systematically start the test once the build is done ?

 - Or are you trying to add a "test" target at the top-level that would run
the test of all projects ?


Finally, the addition ExternalProject_Install_CMake was an attempt to
facilitate installation of the whole project by having "make install"
working in the top-level build directory. We would have to first address an
issue in CMake itself http://www.cmake.org/Bug/view.php?id=14955.

For now, to avoid confusion, I will remove the function.

Hth
Jc


On Mon, Nov 3, 2014 at 5:46 PM, jmerkow <jmerkow at gmail.com> wrote:

> Hello,
>
> My project is using ExternalProjectDependency from [1]. I know that is not
> a
> kitware/cmake project, but I thought Id ask here anyway....
> I have been using testing (ctest) with it by adding tests in the top level
> build with hard-coded directories and names (these targets aren't built
> until the non-superbuild project is built).  I wanted to move the tests to
> the non-superbuild portion of the code so I can use generator expressions,
> but I am having some trouble.
>
> Basically, what I am doing is to include ctest in the non-superbuild
> portion
> then add a custom target.  This works for 'make test' but does not work
> with
> ctest.
>
> add_custom_target(test)
> add_custom_command(TARGET test POST_BUILD
> COMMAND ${CMAKE_COMMAND} --build ${${PROJECT_NAME}_BINARY_DIR}/build
> --target test)
>
> ExternalProjectDependency added a function to add install:
> 'ExternalProject_Install_CMake' I don't see a similar function for testing.
> Is there another good way to do this?  Im not sure what ctest calls to
> initiate testing, using that info, I might be able to get a good work
> around.
>
> -Jameson
>
> [1] https://github.com/commontk/Artichoke
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/ExternalProjectDependency-artichoke-and-ctest-tp7588929.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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://public.kitware.com/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141107/09df1f8e/attachment-0001.html>


More information about the CMake mailing list