Skip to content

Conversation

@uekerman
Copy link
Member

That's a first draft of the Make and CMake lecture content next week. Right now, I have everything in one file. I will later create slides and notes for the demo. I hope what will be a slide and what a demo is rather clear from the document.
There are still a few TODOs for me in the document.

@fsimonis and @ajaust Could you please read through this and give high-level feedback: Is anything just wrong? Am I missing important things? How does the connection to the other material work out? (no need to comment on formatting etc yet)
Thanks!

@ajaust mld does not like the hard tabs in the make blocks, which are needed in case students copy from the notes later. Suggestions how to solve this?

@uekerman uekerman requested a review from ajaust November 19, 2021 11:49
@ajaust
Copy link
Member

ajaust commented Nov 19, 2021

Regarding mdl I have to see whether

@ajaust
Copy link
Member

ajaust commented Nov 19, 2021

I just added an option to ignore hard tabs in code blocks in main. If you rebase the errors should vanish.

Edit: I just tested the new configuration locally and it still complains about the hard tabs. I have to dig a bit further.


TODO: watch some tutorial, learn more

## Explain preCICE `CMakeLists.txt`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, maybe introduce "limitations of CMake".

There are some issues as CMake aims to be the common denominator of build systems.
Example: Globs in CMake -> files in build system: Adding new file -> not respected by build system.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would support such a section. (GNU) Make was treated so badly. No it is time for revenge. 😄

More seriously: It makes sense to mention the shortcomings/pitfalls when using CMake. It is not perfect and might give trouble in certain settings. The students should be made aware of such situations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I have the expertise right now to do such a section.
I am also not sure whether we really need this. In the end, our learning goal here is not that students can compare different build system and pick the best one for a certain project. The learning goal is that they understand how cmake roughly works since it used in many simulation codes.

Example: Globs in CMake -> files in build system: Adding new file -> not respected by build system.

This one I already mention implicitly above

Copy link
Member

@ajaust ajaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added my notes. In total I like it, but from my perspective CMake is praised too much while (GNU) Make is the bad guy here. CMake also has its faults and is an additional complexity layer additional to the actual build system.

One can also write good Makefiles. Sadly, most people write/copy together badly writtenMakefiles.


TODO: watch some tutorial, learn more

## Explain preCICE `CMakeLists.txt`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would support such a section. (GNU) Make was treated so badly. No it is time for revenge. 😄

More seriously: It makes sense to mention the shortcomings/pitfalls when using CMake. It is not perfect and might give trouble in certain settings. The students should be made aware of such situations.

@ajaust
Copy link
Member

ajaust commented Nov 23, 2021

I checked the markdownlint problem again. There is currently no support for hard tabs in code blocks.

What we could do:

  1. Deactivate rule MD010 completely.
  2. Ignore the mdl errors.
  3. Hope/wait that Add MD010 option to allow hard tabs in code blocks markdownlint/markdownlint#396 gets merged soon.
    • We could go for option 1. and open an issue to remind us of the PR.
  4. Move to a JavaScript based linter that has an option to allowing hard tabs in code blocks.
    • I do not have JavaScript/npm installed locally. So I am not sure whether this is a good options for us.

@ajaust
Copy link
Member

ajaust commented Nov 23, 2021

Rule MD010 has been deactivated in main now. I also opened an issue to remins us of reactivating it some time in the future: markdownlint/markdownlint#396

@uekerman
Copy link
Member Author

Closed in favor of #54

@uekerman uekerman closed this Nov 24, 2021
@uekerman uekerman deleted the add-cmake-draft branch October 6, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants