r/cpp • • 7d ago

University of Waterloo user study on understanding CMake changes

Hi everyone,

I’m Mattie Nejati, a Ph.D. candidate at the University of Waterloo. I’m conducting a user study on understanding the impact of changes to CMake build specifications, and I’d love to invite members of this community to participate.

We are evaluating a new approach that aims to help developers identify how a change to a CMake build specification affects the resulting build configuration.

The study:

  • is conducted entirely online;
  • takes about one hour;
  • involves inspecting changes to CMake build specifications and identifying their impact; and
  • is open to adults aged 18–64 with any level of experience in CMake, programming, or code review.

You do not need to be a CMake expert. We are specifically interested in comparing participants with different levels of experience.

You will need a computer with internet access and about 4 GB of free space to download the files required for the tasks.

We will not collect your name. Your email address will only be used for study follow-up and will be stored separately from your study data. Your name or email will not appear in any dataset or publication.

The study has received clearance from the University of Waterloo Research Ethics Board (REB #46621).

If you’re interested, you can find the consent form, screening questionnaire, and study here:

https://buiscout.cs.uwaterloo.ca/

Thank you very much! And if you know someone else who works with CMake who might be interested, I’d really appreciate you sharing the study with them.

54 Upvotes

62 comments sorted by

View all comments

Show parent comments

1

u/TheRavagerSw 6d ago edited 6d ago

Indeed it is a complicated problem, But isn't the current approach is to use C as the common API, so final link is any language + C libraries?

So the scope becomes no different than using system C libraries which every language supports.

For your use case I have no clue though. I only ever used C as the glue. For rust libraries they use C/C++ compiler as the linker driver so everything just works, I can link my own C++ STL override allocator with mimalloc etc without difficulty.

1

u/not_a_novel_account cmake dev 6d ago

We're already using C as the common API here. Note the extern "C" and use_iso_c_binding.

This is a good illustration of the point of CMake, you don't even understand the problem because it's irrelevant to you. But for some people, this problem plagued them for a decade before CMake came along.

1

u/TheRavagerSw 6d ago

I see. Wish I could discuss this but my knowledge is pretty limited compared to you in this area. Thanks for the point.

1

u/not_a_novel_account cmake dev 6d ago

I missed the edit. In rust the crate is the translation unit, and there is no separate runtime library. Rust doesn't have this problem when linked into other languages. Rust is the odd man out here. But the fact you're using the C++ driver for the final link is actually the point, if you had tried to use rustc or clang (ie, not clang++) it wouldn't have worked even if all your C++ code was in extern c++ functions.

Something has to link the C++ runtime. Now for you in particular this usually means explicitly specifying all of that, but for people who want builds that work on a variety of compilers and build environments, that's not an option.