Re: adding source files for compilation

Sven Brauch <mail-ITmcY+a7/[email protected]>
Newsgroups gmane.comp.kde.users.kdevelop
Message-ID <[email protected]>
Hi,

On 11/24/2016 07:56 PM, Robert Puskas wrote:
> After browsing around the project folder created by KDevelop, I
> noticed that none of the cmake files contain any entry about my newly
> added my.h and my.cpp files, so I suspect my.cpp is never compiled
> and/or linked.
That's correct.

> Could somebody tell me how to add these files to the
> compile list?
Just add them to the add_executable() call in CMakeLists.txt, e.g.
something like add_executable(test main.cpp foo.cpp something.cpp)

> Is there an automatic way (if I use the create file
> option from the menu, it would automatically mark the file to be
> compiled) for this? Maybe I'm just doing something wrong?
We had this in the past, but had to remove the component which did it
because it was too complicated. Right now, you have to add your source
files by hand to the CMakeLists.txt file. Re-introducing the assistant
doing that automatically would certainly be a nice feature.

Greetings,
Sven
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJYOGxtAAoJEGjKjjjEuz9LY9sP/3SoUEYQX2hGA8JOMupDVMaR
1xEfeo62HWs5S/nif2VxLymM1jpgvMvxUrsX5NAf4DV8Y5LOPgupZCmkMSq8UHn/
jauFxw2NFmn23IhAY137TDxlWqj4xA3y5rec3T5trrcz3EXRCn776yPdOeOrQkB6
GxNpkON9tCUXVd6Xa4vlXvmoo2jRwcaX5q4sb1MsKxrWNTLJWdbO1vMWwbxa1H8N
6bjHWuGsOlvyjAQ07r+usWq56QJveAIqw/CWMsoZycQ1SK0wu4bfT+vTc4sCtfkP
ku4v6paK61S39qeL0jNQSag+jE3P8dDZBwLDI57reZHeFVmnSeooLrDCakxsVu4Q
4biofaoKTP/b6r9OfRI5eahBfp0SyTtFAMiVSbIXC5c1EVODvBM8XwmUblnJFefh
+S0a6sqbGiMEn3dHYXeQnc+VHmzmU9RIyeO9TOWD9Qn3c/j2zaqx2v5YMSmljpPi
NcktBR+embE1Q8OQ2T3Zblan/WjtUoE7w93yrsqdgFuy+UDlY+mooICUEq3SZgih
z2vDJ+FHqb7p73OrckzhpgXsBgUOWj4BP/QRZa2IuXY5dGrKsiyr0Els4GnsFEZH
wwaDeu8pAFEdH0AzgnGD6pkBpZluXJi5p7zLctw/uH9VmH6Gktg7xozI2AzWr7qI
bI9HNwejbvBR7OaTU+rC
=jf8K
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.