Why can't I find the demo in the folder after generating the release solution

53 views
Skip to first unread message

Heming Chang

unread,
Apr 11, 2023, 1:43:41 AM4/11/23
to ProjectChrono
Dear professor,
       What are the possible reasons why I did not generate a demo file when I wrote the CPP file and completed the cmake operation to generate a release or debug solution?
        I am still in the stage of learning software, and I would like to thank all the professors for  guidance!Thank you again!

shlok sabarwal

unread,
Apr 11, 2023, 1:53:13 AM4/11/23
to ProjectChrono
Hello Heming!

I am a member of the project chrono group (although not Professor Negrut!), but I believe I may have an idea as to why this may be happening. From the information you've provided, I have a feeling that you might not have added your custom CPP demo to the required CMakeList.txt which is used by CMake to know which demos to build! (Sorry if you did do so!).

If this is the case, could you please take a look at this line of code from GitHub? https://github.com/projectchrono/chrono/blob/149fffc6840ebe45d73f47a1730a2d0f358f66cc/src/demos/cascade/CMakeLists.txt#L46. This is a CMakeLists.txt file from our cascade module inside the demos folder that specifies the names of the demos (corresponding to file names) to build! If not done already, could you please try adding your file name to the appropriate CMakeLists.txt in the folder as done in the code above!

if this was not it, please let me know so and I'll do my best to work with you and come up with a solution for this!
I hope this helps!

Best,
Shlok Sabarwal

Heming Chang

unread,
Apr 11, 2023, 2:46:13 AM4/11/23
to ProjectChrono
Thank you for taking the time to answer my question. I will try some of your solutions. Thank you again!

Radu Serban

unread,
Apr 11, 2023, 4:16:40 AM4/11/23
to ProjectChrono

While Shlok’s suggestion is a possibility, it would pollute the Chrono source tree. It is a lot better to separate your own projects and experiments from the Chrono demos.  Two options for that:

  1. Create your own project dependent on Chrono. The Chrono distribution contains a sample for such a project (see https://github.com/projectchrono/chrono/tree/main/template_project).  Copy that entire ‘template_project’ directory elsewhere and then run CMake within it.  This is documented at: https://api.projectchrono.org/tutorial_install_project.html.
  2. Create a separate hierarchy of projects and experiments inside Chrono (better yet, in a fork of the Chrono repository), parallel to the ‘demos’ in Chrono. For an example on how you could set that up, see for example my own fork of Chrono at https://github.com/rserban/chrono and look at how I set up the ‘src/projects/’ hierarchy.

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/3f1fb6bf-fa17-4946-9dde-71e1b28ab072n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages