Nystrom's Crafting Interpreters: An Implementation in C++
mkdir build
cd build
cmake ..
cmake --build .
Or, to optionally build and run tests and benchmarking, use this cmake command instead:
cmake .. -DENABLE_TESTING=TRUE
This project comes with vagrant files to make it easier to build on a variety of platforms with a variety of compilers.
cd vagrant/ubuntu-xenial64-g++-7
vagrant up
Or.
cd vagrant/ubuntu-xenial64-clang-5
vagrant up
In the VM, run:
mkdir build
cd build
cmake /cpplox
cmake --build .
cd vagrant/w16s-vs17c
vagrant up
- Install CMake. The installer will be on the desktop. Select the option to add cmake to the system PATH.
- Install Visual Studio's Desktop Development with C++. Navigate to Control Panel > Programs and Features. Select Microsoft Visual Studio and press Change. Update the Visual Studio installer, then update Visual Studio itself. Finally, modify the installation and tick the box to install Desktop Development with C++.
In the VM, open a command prompt and run:
pushd \\vboxsvr\cpplox
cd /d %userprofile%
mkdir build
cd build
cmake z: -A x64
cmake --build . --config Release
Are you behind a proxy? I feel your pain. Start by running:
vagrant plugin install vagrant-proxyconf
Then in the Vagrantfile
s, uncomment the config.proxy
lines and enter your real proxy values.
Copyright 2018 Jeff Mott. MIT License.