Q: How can I use CMake to build LIBLINEAR?

In this directory we provide two files: Respectively put them into `liblinear' and `liblinear/blas' directories.

In the first CMakeLists.txt file, the version number in cmake_minimum_required (VERSION 3.16.3) can be modified.

On Unix systems, type ``cmake .'' and ``make'' to build the `train' and `predict'.

On Windows system, please download the CMake installer with the extension .msi (e.g., cmake-3.21.3-windows-x86_64.msi). And select `Add CMake to the system PATH for All users' option when installing.

For the usage on Windows, CMake GUI works, but for simplicity we show only the command-line setting. In a command window, type

 
cmake CMakeLists.txt -G "Visual Studio 16 2019"
Our example uses Visual Studio 16 2019. You can type ``cmake --help'' to see on your platform which compilers are ready for use. Then type
cmake --build . --config Release
After finishing the above, `train.exe' and `predict.exe' will be built in the directory `Release'.

Acknowledgement: The code we provided is modified based on https://github.com/cjlin1/liblinear/pull/26