Commit 68237068 authored by Marian Triebe's avatar Marian Triebe

Add `--no-compiler-check` to configure script.

With this option you can disable the compiler version check.
parent 2de0c407
......@@ -72,28 +72,30 @@ endif()
################################################################################
# check for g++ >= 4.7 or clang++ > = 3.2
try_run(ProgramResult
if(NOT NO_COMPILER_CHECK)
try_run(ProgramResult
CompilationSucceeded
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/get_compiler_version.cpp
RUN_OUTPUT_VARIABLE CompilerVersion)
if(NOT CompilationSucceeded OR NOT ProgramResult EQUAL 0)
if(NOT CompilationSucceeded OR NOT ProgramResult EQUAL 0)
message(FATAL_ERROR "Cannot determine compiler version")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
if(CompilerVersion VERSION_GREATER 4.6)
message(STATUS "Found g++ version ${CompilerVersion}")
else()
message(FATAL_ERROR "g++ >= 4.7 required (found: ${CompilerVersion})")
endif()
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if(CompilerVersion VERSION_GREATER 3.1)
message(STATUS "Found clang++ version ${CompilerVersion}")
else()
message(FATAL_ERROR "clang++ >= 3.2 required (found: ${CompilerVersion})")
endif()
else()
else()
message(FATAL_ERROR "Your C++ compiler does not support C++11 "
"or is not supported")
endif()
endif()
# check if the user provided CXXFLAGS, set defaults otherwise
if(CMAKE_CXX_FLAGS)
......
......@@ -33,6 +33,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--build-static build as static and shared library
--build-static-only build as static library only
--more-clang-warnings enables most of Clang's warning flags
--no-compiler-check disable compiler version check
Installation Directories:
--prefix=PREFIX installation directory [/usr/local]
......@@ -212,6 +213,9 @@ while [ $# -ne 0 ]; do
--more-clang-warnings)
append_cache_entry MORE_CLANG_WARNINGS BOOL yes
;;
--no-compiler-check)
append_cache_entry NO_COMPILER_CHECK BOOL yes
;;
--with-log-level=*)
level=`echo "$optarg" | tr '[:lower:]' '[:upper:]'`
case $level in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment