From fb1917e2359213a8c20286ef12e43485a1435d94 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Mon, 30 Dec 2019 14:40:04 -0500 Subject: [PATCH] Document unity builds and alternative ways of installing chocolatey. --- CMakeLists.txt | 4 ---- docs/install.adoc | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9b085c80..b963157ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime -# The unity builds are supported if you use cmake 3.16+. -# Synopsis: -# cmake ... -DCMAKE_UNITY_BUILD=TRUE ... - project(Verilator VERSION 4.025.99 HOMEPAGE_URL https://verilator.org diff --git a/docs/install.adoc b/docs/install.adoc index f55524872..00e408235 100644 --- a/docs/install.adoc +++ b/docs/install.adoc @@ -75,14 +75,25 @@ choco install activeperl ninja winflexbison3 git :: Build git clone https://git.veripool.org/git/verilator verilator + cmake -G Ninja -S verilator -B verilator-build +:: creates a ninja build script in the build directory + cmake --build verilator-build --config Release +:: runs ninja in the build directory; ninja could also be +:: ran directly .... Verilator is built, statically linked, under `./verilator-build/bin`. The binary itself has no other runtime dependencies, but it's expected to be invoked via the `bin/verilator` Perl wrapper. +Unity builds are supported with cmake 3.16 or newer. A unity build concatenates +groups of multiple source files prior to compilation. This can speed up compilation +on some platforms. + + cmake -G Ninja -S verilator -B verilator-build -DCMAKE_UNITY_BUILD=TRUE + == Detailed Build Instructions This section describes details of the build process, and assumes you are @@ -126,7 +137,12 @@ Those developing Verilator may also want these (see internals.adoc): It's most convenient to install all the prerequisites using the https://chocolatey.org[Chocolatey] package manager. You can install it -from an administrative powershell window as follows: +from an administrative `cmd.exe` shell window as follows: + + + @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" + +Or, from an administrative `PowerShell.exe` window: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))