Generate C# project using CMake

As of CMake 3.8.2, CSharp project generation is officially supported by CMake. To build the default Visual Studio 2017 generated C#/WPF project using CMake, create a CMakeList.txt file as follows. Project Declaration project(Example VERSION 0.1.0 LANGUAGES CSharp) Include CMake CSharpUtilities if you are planning on using WPF or other designer properties. include(CSharpUtilities) Add all cs, … Read more

How do I force cmake to include “-pthread” option during compilation?

The Threads module in the latest versions (>= 3.1) of CMake generates the Threads::Threads imported target. Linking your target against Threads::Threads adds all the necessary compilation and linking flags. It can be done like this: set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads REQUIRED) add_executable(test test.cpp) target_link_libraries(test Threads::Threads) Use of the imported target is highly recommended for new … Read more

Build NuGet Package automatically including referenced dependencies

Your point #3 (Add references to various .dll files/other projects <– this is the missing part) really contains two different issues: (1) add references to various dll files, and (2) add references to other projects in the same solution. Number (2) here has gotten some added support as of NuGet 2.5. You can add an … Read more

Have Grunt generate index.html for different setups

I recently discovered these Grunt v0.4.0 compatible tasks: grunt-preprocess Grunt task around preprocess npm module. grunt-env Grunt task to automate environment configuration for future tasks. Below are snippets from my Gruntfile.js. ENV setup: env : { options : { /* Shared Options Hash */ //globalOption : ‘foo’ }, dev: { NODE_ENV : ‘DEVELOPMENT’ }, prod … Read more

How can I get CMake to find my alternative Boost installation?

You should have a look at FindBoost.cmake script, which handles Boost detection and setting up all Boost variables. It typically resides in /usr/share/cmake-2.6/Modules/. In it, you will find documentation. For instance: # These last three variables are available also as environment variables: # # BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for # … Read more

CruiseControl [.Net] vs TeamCity for continuous integration?

I have worked on and with Continuous Integration tools since the one that spawned Cruise Control (java version). I’ve tried almost all of them at some point. I’ve never been happier than I am with TeamCity. It is very simple to set up and still provides a great deal of power. The build statistics page … Read more