[CMake] (no subject)

Eric Noulard eric.noulard at gmail.com
Fri Aug 30 03:17:35 EDT 2013


2013/8/30 Thomas Taranowski <tom at baringforge.com>:
> I'm running into somewhat of an arcane problem at the moment.
>
> The setup:
> * I have a source file that is autogenerated.  In this case it is
> event_log_msg_if.ac.cpp.
> * I have marked the cpp as autogenerated via the
> 'set_source_files_properties' api
> * I have an add_library(foo /path/to/file/event_log_msg_if.ac.cpp)
>
> Any idea why I'm getting an "No rule to make target" for this? It looks like
> cmake doesn't have a rule to build .cpp files.

Nope in this case CMake lacks the source file itsefl
"`../event_log/event_log/local/ac/event_log_msg_if.ac.cpp"

> Could the .ac.cpp cause an issue?
>
>
> Excerpt of output:
>
> Scanning dependencies of target event_log
> [ 65%] Building CXX object
> event_log/CMakeFiles/event_log.dir/local/ac/event_log_msg_if.ac.cpp.o
> make[2]: *** No rule to make target
> `../event_log/event_log/local/ac/event_log_msg_if.ac.cpp', needed by
> `event_log/CMakeFiles/event_log.dir/event_log/local/ac/event_log_msg_if.ac.cpp.o'.
> Stop.
> make[1]: *** [event_log/CMakeFiles/event_log.dir/all] Error 2

The target of the offending rule is "event_log_msg_if.ac.cpp.o"
The source of this target is "event_log_msg_if.ac.cpp"
The source is missing and CMake can't find any rule to build it.

May the file hasn't been properly generated?
You said
"I have a source file that is autogenerated"

the question is "when" and did you specify this "autogeneration" step
using a custom command
to CMake?

-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org


More information about the CMake mailing list