-
Notifications
You must be signed in to change notification settings - Fork 16
Building on Windows
- Bison
- re2c
- Visual Studio with C++ support
You can create the solution using cmake-gui or cmake. This is an example of the command line to generate VS 2010 project files:
cmake.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=c:/clever/ -G "Visual Studio 10" --build c:/clever/ c:/clever/
You probably want to specify the CMAKE_MODULE_PATH to the clever folder (which was c:/clever/ in the example), since cmake needs to find the FindRE2C.cmake file. Of course, bison and re2c must be in your path. You can override their locations by using something like this:
-DBISON_EXECUTABLE=c:/clever-tools/bin/bison.exe -DRE2C_EXECUTABLE=c:/clever-tools/bin/re2c.exe
This is pretty straightforward. After you created the solution (Clever.sln), you can just open it with Visual Studio and build it.
First of all, grab a copy of PCRE and build it on Windows using its CMake. Make sure you don't change the compiler flags (some might create problems with clever's). After installing it, you should have a folder with a include/ and a lib/, which has all files we need.
When creating clever's solution files, make sure you pass to CMake the PCRE directory, like this:
-DPCRECPP_DIR="c:/clever-tools/pcre-8.30/"
The C:\clever-tools\pcre-8.30\ is the install prefix for PCRE (so the include and lib folders are inside of it). Clever's CMake will test for some headers and libs, and if everything went well, the output should show that std.regex will be compiled:
-- MOD std_regex -- ON