I now added documentation, removed ARGS and GENERATED property. -----Original Message----- From: Brad King [mailto:[email protected]] Sent: Freitag, 11. September 2015 20:33 To: Andreas Bergmeier Cc: Rolf Eike Beer; [email protected] Subject: Re: [cmake-developers] Python extension to FindProtobuf
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
________________________________
Diese E-mail enthält VERTRAULICHE UND PERSÖNLICHE INFORMATIONEN und/oder
PRIVILEGIERTE UND VERTRAULICHE MITTEILUNGEN, die ausschließlich für die
angesprochenen Empfänger bestimmt sind. Ohne ausdrückliche schriftliche
Zustimmung des Absenders dürfen diese Informationen und Mitteilungen nicht an
irgendeinen Dritten außerhalb der Organisation des Empfängers weitergeleitet
oder zur Kenntnis gebracht werden. Wenn Sie diese E-mail versehentlich
empfangen haben, teilen Sie dies bitte dem Absender umgehend telefonisch oder
durch Rücksendung dieser E-mail mit, und zerstören Sie die Mail sowie Ihre
evtl. Rückmail bitte anschließend, ohne eine Kopie zu erstellen. Koch Media
übernimmt keinerlei Verantwortung für mögliche Verluste oder Beschädigungen,
resultierend aus virus-infizierten E-mails bzw. Viren in Anhängen.
This e-mail may contain CONFIDENTIAL AND PROPRIETARY INFORMATION and/or
PRIVILEGED AND CONFIDENTIAL COMMUNICATION intended solely for the recipient
and, therefore, may not be retransmitted to any party outside of the
recipient's organization without the prior written consent of the sender. If
you have received this e-mail in error please notify the sender immediately by
telephone or reply e-mail and destroy the original message without making a
copy. Koch Media accepts no liability for any losses or damages resulting from
infected e-mail transmissions and viruses in e-mail attachment.
commit-226ffb3
Description: commit-226ffb3
-- 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
