CMake one build directory for multiple projects

First of all, it doesn’t look like the CMake code you posted belongs to the top CMakeList.txt file, since it directly references .cpp files, and “projectA”. There are also a few things that are not idiomatic: cmake_minimum_required(VERSION 3.2.2.) why the trailing dot here ? Not sure whether cmake will complain, but it is useless either … Read more

GNU Make silent by default

If you define the target .SILENT:, then make will not echo anything. It’s usually best to guard the definition, so you can easily turn it off: ifndef VERBOSE .SILENT: endif Now by default, make will print nothing, but if you run make VERBOSE=1, it will print. Note that despite the statement in the manual claiming … Read more

Makefile error make (e=2): The system cannot find the file specified

The error process_begin: CreateProcess(NULL, pscp blob.txt username@hostname:/folder/, …) failed. make (e=2): The system cannot find the file specified. is almost certainly complaining that Windows cannot find pscp. This is almost certainly because the value of %PATH% (or whatever) is different when make spawns a shell/console then when you have it open manually. Compare the values … Read more

Understanding roles of CMake, make and GCC

CMake generates files for other build systems. These can be Makefiles, Ninja files or projects files for IDEs like Visual Studio or Eclipse. The build files contain calls to compilers like GCC, Clang, or cl.exe. If you have several compilers installed, you can choose one. All three parts are independent. The compiler, the build system … Read more

Missing separator in Makefile?

Given your update with the error, check what you have on the line before those ${CC} commands. Many make programs require a real tab character before the commands and editors that put in eight spaces (for example) will break them. That’s more often than not the cause of the “Missing separator” errors. You can see … Read more

Have jshint ignore certain files when building Twitter Bootstrap

So there is an option to ignore files in jshint, but it’s not set within .jshintrc but rather a separate file .jshintignore, which makes sense. However, while jshint will look for .jshintrc in your project’s subdirectories, .jshintignore needs to be in the project root. So with Twitter Bootstrap, .jshintrc is in /js while .jshintignore needs … Read more