Install CMake on MacOS from the terminal for an automated build
I'm working on an automated build pipeline for a C++ project that should be build on a MacOS virtual machine. Therefore I was looking for a way to automatically install cmake from the terminal shell. What I have is the following...
sudo hdiutil attach cmake-3.8.1-Darwin-x86_64.dmg
sudo cp -Rf /Volumes/cmake-3.8.1-Darwin-x86_64/CMake.app /Applications/
hdiutil detach /Volumes/cmake-3.8.1-Darwin-x86_64
sudo /Applications/CMake.app/Contents/bin/cmake-gui --install
... which works well, except for a single flaw. The CMake installation forces the shell into the interactive mode for accepting the license page, which I was unable to find any way to automate. How could I achieve a fully automated install of CMake on MacOS from the shell ?
Thanks