What is the difference between using a Makefile and CMake to compile the code?

Make (or rather a Makefile) is a buildsystem – it drives the compiler and other build tools to build your code. CMake is a generator of buildsystems. It can produce Makefiles, it can produce Ninja build files, it can produce KDEvelop or Xcode projects, it can produce Visual Studio solutions. From the same starting point, … Read more

Debug vs Release in CMake

With CMake, it’s generally recommended to do an “out of source” build. Create your CMakeLists.txt in the root of your project. Then from the root of your project: mkdir Release cd Release cmake -DCMAKE_BUILD_TYPE=Release .. make And for Debug (again from the root of your project): mkdir Debug cd Debug cmake -DCMAKE_BUILD_TYPE=Debug .. make Release … Read more

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

CMake 3.X CMake 3.X offers a ‘clean’ target. cmake –build C:/foo/build/ –target clean From the CMake docs for 3.0.2: –clean-first = Build target ‘clean’ first, then build. (To clean only, use –target ‘clean’.) CMake 2.X There is no cmake clean in CMake version 2.X I usually build the project in a single folder like “build”. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)