mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 02:35:48 +00:00 
			
		
		
		
	- Update Docker image to Boost 1.70 - Bust dependency cache - Pass `Boost_NO_BOOST_CMAKE` to CMake
		
			
				
	
	
		
			32 lines
		
	
	
		
			894 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			894 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
set -o xtrace
 | 
						|
set -o errexit
 | 
						|
 | 
						|
# The build system. Either 'Unix Makefiles' or 'Ninja'.
 | 
						|
GENERATOR=${GENERATOR:-Unix Makefiles}
 | 
						|
# The compiler. Either 'gcc' or 'clang'.
 | 
						|
COMPILER=${COMPILER:-gcc}
 | 
						|
# The build type. Either 'Debug' or 'Release'.
 | 
						|
BUILD_TYPE=${BUILD_TYPE:-Debug}
 | 
						|
# Additional arguments to CMake.
 | 
						|
# We use the `-` substitution here instead of `:-` so that callers can erase
 | 
						|
# the default by setting `$CMAKE_ARGS` to the empty string.
 | 
						|
CMAKE_ARGS=${CMAKE_ARGS-'-Dwerr=ON'}
 | 
						|
 | 
						|
# https://gitlab.kitware.com/cmake/cmake/issues/18865
 | 
						|
CMAKE_ARGS="-DBoost_NO_BOOST_CMAKE=ON ${CMAKE_ARGS}"
 | 
						|
 | 
						|
if [[ ${COMPILER} == 'gcc' ]]; then
 | 
						|
  export CC='gcc'
 | 
						|
  export CXX='g++'
 | 
						|
elif [[ ${COMPILER} == 'clang' ]]; then
 | 
						|
  export CC='clang'
 | 
						|
  export CXX='clang++'
 | 
						|
fi
 | 
						|
 | 
						|
mkdir build
 | 
						|
cd build
 | 
						|
cmake -G "${GENERATOR}" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${CMAKE_ARGS} ..
 | 
						|
cmake --build . -- -j $(nproc)
 |