How to specify a compiler in CMake?

To select a specific compiler, you have several solutions, as exaplained in CMake wiki: Method 1: use environment variables For C and C++, set the CC and CXX environment variables. This method is not guaranteed to work for all generators. (Specifically, if you are trying to set Xcode’s GCC_VERSION, this method confuses Xcode.) For example: … Read more

Looking for a ‘cmake clean’ command to clear up CMake output

CMake 3.X CMake 3.X offers a ‘clean’ target. From the CMake docs for 3.0.2: CMake 2.X There is no cmake clean in CMake version 2.X I usually build the project in a single folder like “build”. So if I want to make clean, I can just rm -rf build. The “build” folder in the same directory as the root … Read more

Looking for a ‘cmake clean’ command to clear up CMake output

CMake 3.X CMake 3.X offers a ‘clean’ target. From the CMake docs for 3.0.2: CMake 2.X There is no cmake clean in CMake version 2.X I usually build the project in a single folder like “build”. So if I want to make clean, I can just rm -rf build. The “build” folder in the same directory as the root … Read more

tech