-9

The question I'm referring to is this: Understanding the Purpose Behind CMake.

It seems a little broad to me. Are there ways to improve it?

Here is the body of the question:

I am trying to understand the purpose behind CMake. Why it is designed like it is right now. Here are some questions I would like to have answered.

  • Why does cmake generate makefiles instead of just building the project?
  • Why are cmake files a series of commands and not just configuration files eg: ini/xml/yaml
  • What are the commands that I write into the CMakeLists.txt supposed to do? Just calling the compiler would be too easy I guess
  • In which order am I supposed to do the commands?
  • Is everything case insensitive? Can I write everything lower case?
  • Why do tutorials advise me to list every source file explicitly?
  • How do I structure my CMakeLists.txt to keep it short and simple to maintain. Every file I looked up in real projects looked very cluttered.

I think the last three bullet points / questions could do well as their own question posts.

The second last seems to be a duplicate of Is it better to specify source files with GLOB or each file individually in CMake? and/or Why is cmake file GLOB evil?

The question is quite old (8 years now!) and answers have already been posted. I guess the standards for questions were different back then? Compared to the age of that question, I am very new here, so I hope I'm not overstepping anything by asking this.

Or should it just be left completely as-is for the sake of its historical value?

2
  • 15
    A LITTLE broad? SEEMS?
    – philipxy
    Jan 21 at 10:19
  • 2
    I count 7 questions, 8 if you count the "what does CMake do" wrapper question. whistles. I don't think I've ever seen more than 4 or 5. Nice find! 8 years ago puts it in the "after 2012" time period so the standards were not really THAT different from what they are today. Anything before 2012 I consider to be the wild west period.
    – Gimby
    Jan 24 at 13:28

1 Answer 1

19

The referenced question post is just a bunch of questions, and some of them are too broad by themselves. I don't see any reason to salvage it.

The question is definitely not suited for Stack Overflow standards even in 2014, when it was asked. But it somehow has survived three attempts to close it: https://stackoverflow.com/posts/25751406/timeline.

If you find some of its (sub-)questions to be useful, you could reask it in separate post... But I don't think that any of these questions are suitable:

Why does cmake generate makefiles instead of just building the project?

Opinion-based: Because CMake has been designed so.

Why are cmake files a series of commands and not just configuration files eg: ini/xml/yaml

See above.

What are the commands that I write into the CMakeLists.txt supposed to do? Just calling the compiler would be too easy I guess.

Obviously too broad.

In which order am I supposed to do the commands?

Obviously too broad.

Is everything case insensitive? Can I write everything lower case?

E.g., variables are case sensitive: CMake variable names case sensitive?

Why do tutorials advise me to list every source file explicitly?

It is actually about GLOB, and you correctly list questions on this topic.

How do I structure my CMakeLists.txt to keep it short and simple to maintain. Every file I looked up in real projects looked very cluttered.

A question about the best structure of CMake project is opinion-based.

9
  • Claiming something as opinion-based, but then immediately providing a factual response seems very on brand for SO. I do agree with the broader point being made, but that struck me as funny.
    – sweenish
    Jan 21 at 16:48
  • this mentality is exactly why I am no longer active on Stack overflow. It is just too hostile towards people who are eager to learn.
    – Arne
    Jan 27 at 10:03
  • 4
    @Ame: "It is just too hostile towards people who are eager to learn." - Stack Overflow is "hostile" to questions which are not suited for Stack Overflow format. The thing is that not suited questions cannot be answered reliably here, and we don't want to give illusion to the asker (and future visitors) about quality of such answers.
    – Tsyvarev
    Jan 27 at 10:09
  • @Arne perhaps people could also be a little more eager to learn How to Ask good questions on Stack Overflow as well...
    – starball
    Jan 27 at 10:15
  • @Tsyvarev exactly. And I don't think that the "Stack Overflow format" is in any way helpful for me to get my questions answered. I've seen way too many really interesting and insightful questions get closed because of the Stack Overflow format. The questions were really interesting, but sadly they didn't fit the format and the format is more important than value to the author or people who contribute to the question.
    – Arne
    Jan 27 at 17:42
  • @user nah, I rather ask my questions elsewhere, where I there isn't a crowd of format junkies, who are super excited to bash on everything that doesn't fit their definition of a good question.
    – Arne
    Jan 27 at 17:46
  • 2
    The format isn't mean to be a help desk, even though the way it is designed makes it look and work like one. Useful questions thrive, not useful questions don't. A 3rd category of questions exist that don't fit the format but receive upvotes anyway, these generally need to be handled manually by users with the reputation to do so to avoid people getting the misconception that this type of question is allowed/wanted here.
    – Kevin B
    Jan 27 at 17:47
  • @KevinB useful questions get upvotes, thrive, and then get closed for not complying the format. The problem is, the format doesn't help at all to get good answers, complying the format only helps to keep the format warriors and questions closers at bay. A fight that doesn't need to be fought anywhere else.
    – Arne
    Jan 27 at 19:14
  • 2
    i mean... it's not much of a fight. The guidelines here are pretty easy use to determine whether not a post follows them. Nothing is forcing users to post questions here that aren't a fit for this network. It's certainly unfortunate that there is no free help desk site out there just for answering any question one might have.
    – Kevin B
    Jan 27 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .