mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	[TravisCI] Add Z3_WARNINGS_AS_ERRORS environment variable to
				
					
				
			control the `WARNINGS_AS_ERRORS` CMake option.
This commit is contained in:
		
							parent
							
								
									6e2ca69654
								
							
						
					
					
						commit
						630863619b
					
				
					 4 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -28,6 +28,7 @@ ARG Z3_INSTALL_PREFIX=/usr
 | 
			
		|||
ARG Z3_STATIC_BUILD=0
 | 
			
		||||
# Blank default indicates use latest.
 | 
			
		||||
ARG Z3_SYSTEM_TEST_GIT_REVISION
 | 
			
		||||
ARG Z3_WARNINGS_AS_ERRORS=SERIOUS_ONLY
 | 
			
		||||
ARG Z3_VERBOSE_BUILD_OUTPUT=0
 | 
			
		||||
 | 
			
		||||
ENV \
 | 
			
		||||
| 
						 | 
				
			
			@ -55,6 +56,7 @@ ENV \
 | 
			
		|||
  Z3_STATIC_BUILD=${Z3_STATIC_BUILD} \
 | 
			
		||||
  Z3_SYSTEM_TEST_DIR=/home/user/z3_system_test \
 | 
			
		||||
  Z3_SYSTEM_TEST_GIT_REVISION=${Z3_SYSTEM_TEST_GIT_REVISION} \
 | 
			
		||||
  Z3_WARNINGS_AS_ERRORS=${Z3_WARNINGS_AS_ERRORS} \
 | 
			
		||||
  Z3_INSTALL_PREFIX=${Z3_INSTALL_PREFIX}
 | 
			
		||||
 | 
			
		||||
# We add context across incrementally to maximal cache reuse
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,6 +43,7 @@ the future.
 | 
			
		|||
* `Z3_VERBOSE_BUILD_OUTPUT` - Show compile commands in CMake builds (`0` or `1`)
 | 
			
		||||
* `Z3_STATIC_BUILD` - Build Z3 binaries and libraries statically (`0` or `1`)
 | 
			
		||||
* `Z3_SYSTEM_TEST_GIT_REVISION` - Git revision of [z3test](https://github.com/Z3Prover/z3test). If empty lastest revision will be used.
 | 
			
		||||
* `Z3_WARNINGS_AS_ERRORS` - Set the `WARNINGS_AS_ERRORS` CMake option pased to Z3 (`OFF`, `ON`, or `SERIOUS_ONLY`)
 | 
			
		||||
 | 
			
		||||
### Linux
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,8 @@ set -o pipefail
 | 
			
		|||
: ${DOTNET_BINDINGS?"DOTNET_BINDINGS must be specified"}
 | 
			
		||||
: ${JAVA_BINDINGS?"JAVA_BINDINGS must be specified"}
 | 
			
		||||
: ${USE_LTO?"USE_LTO must be specified"}
 | 
			
		||||
: ${Z3_INSTALL_PREFIX?"Z3_INSTALL_PREFIX"}
 | 
			
		||||
: ${Z3_INSTALL_PREFIX?"Z3_INSTALL_PREFIX must be specified"}
 | 
			
		||||
: ${Z3_WARNINGS_AS_ERRORS?"Z3_WARNINGS_AS_ERRORS must be specified"}
 | 
			
		||||
 | 
			
		||||
ADDITIONAL_Z3_OPTS=()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -120,6 +121,7 @@ cmake \
 | 
			
		|||
  -DCMAKE_BUILD_TYPE=${Z3_BUILD_TYPE} \
 | 
			
		||||
  -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} \
 | 
			
		||||
  -DCMAKE_INSTALL_PREFIX=${Z3_INSTALL_PREFIX} \
 | 
			
		||||
  -DWARNINGS_AS_ERRORS=${Z3_WARNINGS_AS_ERRORS} \
 | 
			
		||||
  "${ADDITIONAL_Z3_OPTS[@]}" \
 | 
			
		||||
  "${Z3_SRC_DIR}"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,6 +120,13 @@ if [ -n "${NO_SUPPRESS_OUTPUT}" ]; then
 | 
			
		|||
  )
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -n "${Z3_WARNINGS_AS_ERRORS}" ]; then
 | 
			
		||||
  BUILD_OPTS+=( \
 | 
			
		||||
    "--build-arg" \
 | 
			
		||||
    "Z3_WARNINGS_AS_ERRORS=${Z3_WARNINGS_AS_ERRORS}" \
 | 
			
		||||
  )
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
case ${LINUX_BASE} in
 | 
			
		||||
  ubuntu_14.04)
 | 
			
		||||
    BASE_DOCKER_FILE="${DOCKER_FILE_DIR}/z3_base_ubuntu_14.04.Dockerfile"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue