Switch to cmake part1#2251
Conversation
robbr48
left a comment
There was a problem hiding this comment.
Seems to work except for the DCPLib. It no is no longer compiled and linked since it is header-only. See separate comments in hopsandcp/CMakeLists.txt.
The conflict is just because I fixed the same typo, so it is very easy to fix.
e9fa0de to
a54ee01
Compare
|
There is something wrong with fmi4c, I get the following error: |
bf5b415 to
1556ca9
Compare
7d3ea5e to
2a0a799
Compare
9126a74 to
0acd1ed
Compare
0acd1ed to
9e5ca6d
Compare
7018bd9 to
56166eb
Compare
|
@peterNordin I would want to make a release before summer. Is this ready to be merged? |
robbr48
left a comment
There was a problem hiding this comment.
It works on Ubuntu. On Windows it compiles, but when I try to run from within Qt Creator it loops for the executables in the wrong folder. I was able to run Hopsan outside of Qt, but for some reason all default components failed to load.
To prevent re-downloading after cleaning code during test builds
Keep the dir to avoid fetching all code every time
Removes warning spam on newer CMake versions
- Qt 5.15 was removed so downgrading - Adjust build order
- Modernize to Pyton 3 (with AI help) - Build Mingw using CMake - MSVC build disabled, but can be added as an option later - Various related changes and fixes
For official builds always clean clone Depth is problematic when switching branches later
Avoid detached head for tags
To enable CI build which may not have these files
56166eb to
a7bc403
Compare
Also handle add workaround for the new cmake requirement
|
@robbr48 It did seem to work last time a was working on it, I tried it on linux and windows mingw / msvc, But I cant be sure that it works in all cases. Release package builds also need to be verified and tested. They looked fine, but its hard to know for sure, I cant test all functions. I just dont have time. But I will at least compare the contents of the new installer packages with the latest release to make sure that all files are included. Your problem with running in QtCreator, which compiler. Mingw or MSVC build? Anyway I rebased it on your latest release, and now everything is broken again. Mostly due to ssp4c build and config needing the same changes as the other dependencies, but it takes a while to work through. And ofcourse CI systems have changed the images again which causes additional problems.... I am trying to make it build for the flathub kde runtime update. After that we can (must) merge this branch. Snap will be updated later in part2 |
On MSVC struct and class can not be mixed
This is part one of switch over to CMake, has been in progress for more than three years.
After adding DCP additional work is needed to be able to build release, but i will make a part2
This PR enables me to build all of Hopsan on Linux GCC, Windows MinGW and Windows MSVC 2019.
Including with DCP. But I do not know if it actually works in all these cases. Hopsan at least starts.
Deb build has been migrated to CMake. But flatpak/snap and Windows builds remain.