Crafting Interpreters: An Implementation in C++
Nystrom'sBuild
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
Vagrant
This project comes with vagrant files to make it easier to build on a variety of platforms with a variety of compilers.
Build with g++-7 or clang-5 on Ubuntu
cd vagrant/ubuntu-xenial64-g++-7
vagrant up
Or.
cd vagrant/ubuntu-xenial64-clang-5
vagrant up
Build
In the VM, run:
mkdir build
cd build
cmake /cpplox
cmake --build .
Build with MSVC 2017
cd vagrant/w16s-vs17c
vagrant up
First time boot manual steps
- 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++.
Build
In the VM, open a command prompt and run:
pushd \\vboxsvr\cpplox
mkdir build
cd build
cmake .. -A x64
cmake --build . --config Release
Copyright
Copyright 2018 Jeff Mott. MIT License.