Похожие чаты

Note: We do not recommend using GLOB to collect a

list of source files from your source tree.
So I'm supposed to list each and every source file in my CMakeLists? It seems too repetitive to me, there must be a better way, isn't it?

6 ответов

6 просмотров

😂, You can hook up a function to python code which does the globing, and prints it out to stdout, then grab those results from cmake into a list.

It is good practice to list the files

Like this: https://cmake.org/cmake/help/latest/command/execute_process.html

Nader-Jafari Автор вопроса
@^@ ^
😂, You can hook up a function to python code which...

I should've included why they don't recommend listing files using CMake itself or that cursed lang you just mentioned ...If no CMakeLists.txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate.

@^@ ^
😂, You can hook up a function to python code which...

Doesn't have to be python btw, just chose it because it's in almost all linux OS

Nader Jafari
I should've included why they don't recommend list...

Have the python script add a space character at the end of the cmake file just so that cmake will think configs have changed.

Похожие вопросы

Обсуждают сегодня

читать файл максимально быстро? странный вопрос))
zamtmn
53
Посоветуйте пожалуйста аудио плеер для библиотеки mp3- FLAC на компьютере. На Винде пользовался Aimp, в том числе для конвертации. Много нужных команд было прямо в контекст...
Виктор Кузнецов
31
How Much Btc Falling Down ?
Suriya
22
Hi guys ! Anvil is out ! Time for me to stake on capacity. Does someone has a clear tutorial ? I’m thinking about buying a ledger. Is that really possible to stake directl...
Mister Grega
15
Приветствуем всех! Устали без проектов? Если вы программист и хотите получать стабильные заказы, компания Elif предлагает вам недельный курс по поиску проектов и их ведению. ...
Elif
1
Is someone using mymonero? What can you say about the wallet?
warrenique
16
It is definitely an interesting conversation. Breaking up the users into 2 personas: 1. Someone who wants to use the products (I want “x” pegged stablecoin that provides safe...
Bueno Pues
10
А чего сейчас в моде вместо Error для эксепшенов? А то я тут внезапно узрел что он не рекомендуется :) У Try::Tiny какой-то совершенно ужасный синтаксис если надо конкретные э...
Denis F
19
Ajeeb aadmi hai, isko padhna nahi aata kya?
Jay Bansal
43
So, does this mean leap 6 is closed source now? https://github.com/AntelopeIO/spring/blob/main/LICENSE
Kameron James | zeos.one
21
Карта сайта