On 01/10/2014 11:43 AM, Nils Gladitz wrote:
On 01/10/2014 11:21 AM, Martin Zenzes wrote:
The problem: At the time the add_library() is processed by cmake, the
referenced *.cpp/*.hpp files are not yet created, hence they are not
found ("Cannot find source file"). Adding the generate-target to ALL
does not help, as at the target is executed to create the file
_after_ the add_library() call is processed.
Any hints?
I think against the "Cannot find source file" problem it would help to
set the "GENERATED" source file property.
add_dependencies(mylibrary mycustomtarget) should make sure they are
build in the right order.
Nils
Thanks. This solved my Problem, indeed!
One little quick follow-on-question. After doing:
set(GENERATED_CPP /path/to/not/yet/created/cpp/file.cpp)
this does not work as expected:
set_property(SOURCE ${GENERATED_CPP} PROPERTY GENERATED)
while this will works as expected:
set_source_files_properties(${GENERATED_CPP} PROPERTIES GENERATED)
bug?
--
M.Sc. Martin Zenzes
Space Robotics
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail: [email protected]
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
--
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://www.cmake.org/mailman/listinfo/cmake