On 09/11/2015 11:11 AM, Andreas Bergmeier wrote:
> Here is the commit.
Thanks. Please revise the patch to also update the documentation
of the module to mention the new API.
> + list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.py")
> + add_custom_command(
> + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.py"
> + COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
> + ARGS --python_out ${CMAKE_CURRENT_BINARY_DIR}
> ${_protobuf_include_path} ${ABS_FIL}
The ARGS option can be dropped. It is silently ignored anyway.
The arguments after it will be collected by COMMAND already.
> + DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
> + COMMENT "Running Python protocol buffer compiler on ${FIL}"
> + VERBATIM )
> + endforeach()
> +
> + set_source_files_properties(${${SRCS}} PROPERTIES GENERATED TRUE)
We do not need to explicitly set the GENERATED property. That
convention has been outdated for years. The add_custom_command
call automatically sets this on the OUTPUT.
Thanks,
-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/mailman/listinfo/cmake-developers