We need Visual studio, cmake, and m4 to build Csmith on Windows with Visual Studio.
- Visual Studio: Download Visual Studio community edition here
- cmake: Download cmake binary for Windows here
- m4: Download m4 for Windows
here.
We need the zip files from both "Binaries" and "Dependencies",
and extract
m4.exe
andregex2.dll
to C:\windows\system32.
Suppose you have cloned the csmith project from github to c:\csmith. We have to run cmake to generate Visual Studio solution/projects files, and build them with Visual Studio.
- generate solution/project files with
cmake
. The first output fromcmake
should indicate the target is Visual Studio.cd c:\csmith cmake -DCMAKE_INSTALL_PREFIX=<install-prefix> .
- Build the solution with Visual Studio by opening the generated
csmith.sln
and hitbuild solution
.
You can Install the build outputs with Visual Studio
by building the INSTALL
project. The necessary bits for
deployment is gathered under the folder designated by
<install-prefix>
.
We need WSL, gcc/g++, cmake, and m4 to build csmith with WSL.
- Follow this instruction to install WSL (choose Ubuntu as the distro) on Windows.
- Open WSL/Ubuntu terminal window, and run:
sudo apt install g++ cmake m4
This is standard and the same as building/installing csmith on Linux:
cmake -DCMAKE_INSTALL_PREFIX=<install-prefix> .
make
make install