Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the CMake executable in our MM config file. #9563

Merged
merged 1 commit into from Oct 20, 2022

Conversation

mahge
Copy link
Contributor

@mahge mahge commented Oct 20, 2022

  • This allows us to provide a non-default CMake executable to our autoconf config or CMake config. OpenModelica now remembers this selection and uses that exact CMake executable for all its internal uses as well.

  • Improves external library not included in FMU generation #9509.

@mahge mahge added the COMP/Build System Issue and pull request related to the build systems label Oct 20, 2022
@mahge mahge self-assigned this Oct 20, 2022
  - This allows us to provide a non-default CMake executable from to our
    autoconf config or CMake config. OpenModelica now remembers this
    selection and uses that exact CMake executable for all its internal
    uses as well.

  - Improves OpenModelica#9509.
@AnHeuermann
Copy link
Member

How does this work? What do I need to do if I want to use CMake from C:/Program Files/CMake/bin/cmake.exe on a Windows system?

@mahge
Copy link
Contributor Author

mahge commented Oct 20, 2022

You just configure OpenModelica with that CMake

"C:/Program Files/CMake/bin/cmake.exe" -G "MSYS Makefiles" ....

and compile as usual. OpenModelica saves that CMake exe path and will use it instead of just issuing "cmake" and relying on CMake being on PATH.

Basically, all the commands that were using "cmake ...." are now changed to the form Autconf.cmake + "..." instead. Autconf.cmake is initialized from the CMake exe you used to configure OpenModelica with.

Copy link
Member

@AnHeuermann AnHeuermann left a comment

Choose a reason for hiding this comment

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

LGTM

@mahge mahge enabled auto-merge (squash) October 20, 2022 13:37
@mahge mahge merged commit cbd5ef9 into OpenModelica:master Oct 20, 2022
@mahge mahge deleted the choose_cmake_exe branch October 20, 2022 13:39
@denis-jidovtseff-jc
Copy link

I don't understand where I can change this configuration. Is it command line? what does means the "...." ?
Is it to compile a new complete openmodelica? Or only the model?

@AnHeuermann
Copy link
Member

This PR makes it possible to self-build OpenModelica with some CMake executable on Windows and after that this CMake executable will be used for FMU compilation as well.

So it is a first step, but unless you are self-building OpenModelica from source it isn't useful for the end user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/Build System Issue and pull request related to the build systems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants