Posts Tagged 'CMake'

VS2017 has got CMake support

We are using CMake already for years in my company to develop cross-platform software. CMake is really a great piece of software, but the user experience in Visual Studio was not great. It worked, but we often needed to explain how, and the typical Visual Studio user didn’t know CMake at all.

Now CMake support has been built into Visual Studio directly, which means

  • you can open CMake projects directly.
  • there is no need to generate Visual Studio solutions anymore.
  • you can configure CMake options from the GUI.
  • you can directly execute CMake targets like “install” from the Solution Explorer.

Watch this video to see it in action:
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/cmake-support-in-visual-studio/

This is is really some great news for the Visual Studio world.
Hopefully even more developers will use CMake now in the future.

Advertisements

CMake uninstall

CMake is a great tool when building cross-plattform software. It offers also install target so you can build and install software this way:


# create of-of-source build directory
mkdir bld
cd bld
# run CMake to generate a Makefile
ccmake ..
# Build in 4 cores
make -j 4
# Install into CMAKE_INSTALL_PREFIX (default is /usr/local)
sudo make install

However there is no uninstall target.
But this is no problem as long as you have a shell and the xargs command (part of GNU findutils).

CMake creates a file called install_manifest.txt when executing the install target. This contains a list of all installed files. So for removing them you simply need to execute this command:


# uninstall
xargs rm < install_manifest.txt

Mk script is now on github

An updated version of my ‘mk’ script is now available on github. This way it is easier to update it. See https://github.com/gergap/mk

I blogged about it before in 2014, see https://gergap.wordpress.com/2014/03/04/mk-script-to-simplify-out-of-source-builds