[CMake] Custom target

Gregoire Aujay gaujay at movea.com
Wed Jun 5 13:49:23 EDT 2013


Hello,

Target names should be unique but if you really want to have all your benchmark targets with the same name look at this variable: ALLOW_DUPLICATE_CUSTOM_TARGETS
Latest doc is here: http://www.cmake.org/cmake/help/v2.8.11/cmake.html#prop_global:ALLOW_DUPLICATE_CUSTOM_TARGETS

Regards,
Gregoire

-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Ian Liu Rodrigues
Sent: mercredi 5 juin 2013 19:06
To: cmake at cmake.org
Subject: [CMake] Custom target

Dear all,

Is it possible to create a target for all sub-directories with the same name? For instance, I want to create a "benchmark" target so that every subdir implements a way of bench-marking its own program.

I tried adding a "add_custom_target(benchmark ...)" in the CMakeLists.txt of each subdir, but cmake complains about duplicate target names.

Thanks in advance,
Ian L. Rodrigues
--

Powered by www.kitware.com

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

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

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




More information about the CMake mailing list