On 03/27/2014 11:34 AM, Brad King wrote: > A simpler way to look for the argument: > > if(";${ARGN};" MATCHES ";EXCLUDE_FROM_ALL;([^;]*);") > # ... test CMAKE_MATCH_1 > endif()
Actually you don't need to parse the arg ahead of time. The "ALL" option to add_custom_target just tells it to *not* set the EXCLUDE_FROM_ALL target property. Instead you can leave out "ALL", parse the args as normal, and then add set_property(TARGET ... PROPERTY EXCLUDE_FROM_ALL FALSE) when the EXCLUDE_FROM_ALL option is not set. -Brad -- 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/cgi-bin/mailman/listinfo/cmake-developers