[build] Refactor CMake flags (#2788)

The CMake enable/disable flags as currently structured are a confusing mix of
WITH, WITHOUT, and USE with odd defaults.  This changes the flags to consistently
use WITH and default the build options to everything enabled.
This commit is contained in:
Prateek Machiraju
2020-10-23 00:52:24 -04:00
committed by GitHub
parent 5cdffeaba1
commit 5fe8f9017f
13 changed files with 86 additions and 55 deletions

View File

@@ -94,7 +94,7 @@ jobs:
- os: macos-latest
name: macOS
container: ""
flags: "-DWITHOUT_JAVA=ON"
flags: "-DWITH_JAVA=OFF"
name: "Build - CMake ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
@@ -106,7 +106,7 @@ jobs:
brew install opencv
fi
- name: configure
run: mkdir build && cd build && cmake -DWITHOUT_ALLWPILIB=OFF -DWITH_TESTS=ON ${{ matrix.flags }} ..
run: mkdir build && cd build && cmake -DWITH_SIMULATION_MODULES=OFF ${{ matrix.flags }} ..
- name: build
working-directory: build
run: make -j3
@@ -130,7 +130,7 @@ jobs:
uses: lukka/run-cmake@v3
with:
buildDirectory: ${{ runner.workspace }}/build/
cmakeAppendedArgs: -DWITHOUT_JAVA=ON -DWITHOUT_ALLWPILIB=OFF -DWITHOUT_CSCORE=OFF -DWITH_TESTS=ON
cmakeAppendedArgs: -DWITH_JAVA=OFF -DWITH_SIMULATION_MODULES=OFF
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
useVcpkgToolchainFile: true
- name: Run Tests