From 07839c511ace37979e90ccb5ba0d254d2180bdb3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 10 Nov 2015 17:00:49 -0500 Subject: [PATCH] Update CMakeLists.txt * Require Git * Only complain about Sphinx if BUILD_DOCS is enabled * Just issue a warning for GCC >= 5.x on Linux --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6228a9e1..8e24db16e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,11 @@ macro(CHECK_GCC COMPILER_PATH) execute_process(COMMAND ${COMPILER_PATH} -dumpversion OUTPUT_VARIABLE GCC_VERSION_OUT) string(STRIP "${GCC_VERSION_OUT}" GCC_VERSION_OUT) if (${GCC_VERSION_OUT} VERSION_LESS "4.5" OR ${GCC_VERSION_OUT} VERSION_GREATER "4.9.9") - message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.5 through 4.9") + if ((LINUX) AND (${GCC_VERSION_OUT} VERSION_GREATER "5.0")) + message(WARNING "You are using GCC ${GCC_VERSION_OUT}, which is not recommended - see Compile.rst for more information.") + else() + message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.5 through 4.9") + endif() endif() endmacro() @@ -176,9 +180,9 @@ include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(depends/clsocket/src) add_subdirectory(depends) -find_package(Git) +find_package(Git REQUIRED) if(NOT GIT_FOUND) - message(FATAL_ERROR "could not find git") + message(SEND_ERROR "could not find git") endif() # build the lib itself @@ -196,7 +200,7 @@ endif() add_subdirectory(scripts) -find_package(Sphinx) +find_package(Sphinx QUIET) if (BUILD_DOCS) if (NOT SPHINX_FOUND) message(SEND_ERROR "Sphinx not found but BUILD_DOCS enabled")