Skip to content

Commit

Permalink
[added] gcc min version check
Browse files Browse the repository at this point in the history
Change-Id: Iea13132dd6d8d41b719c1a2af596c8ac691432a4
  • Loading branch information
TheAnswer committed Oct 19, 2018
1 parent 6f8ec58 commit 27dfb8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion MMOCoreORB/CMakeLists.txt
Expand Up @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)

project(core3 CXX C)

include(CheckCXXSourceCompiles)
# Set cmake paths
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

Expand All @@ -13,7 +14,9 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(CheckCXXSourceCompiles)
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)
message(FATAL_ERROR "Only GCC 5.4 or greater is supported")
endif()

# Set up options
option(BUILD_IDL "Generate idl c++ sources with cmake" ON)
Expand Down
4 changes: 2 additions & 2 deletions MMOCoreORB/cmake/Modules/FindGccAtomic.cmake
Expand Up @@ -17,6 +17,6 @@ IF (GCCLIBATOMIC_LIBRARY)
MESSAGE(STATUS "Found GCC's libatomic.so: lib=${GCCLIBATOMIC_LIBRARY}")
ELSE ()
SET(GCCLIBATOMIC_FOUND FALSE)
MESSAGE(STATUS "GCC's libatomic.so not found. This library is essential in AArch64 (if you are on x86, this doesn't matter)")
MESSAGE(STATUS "Try: 'sudo yum install libatomic' (or sudo apt-get install libatomic1)")
MESSAGE(STATUS "GCC's libatomic.so not found.")
MESSAGE(STATUS "Try: 'sudo yum install libatomic' or 'sudo apt-get install libatomic1')")
ENDIF ()

0 comments on commit 27dfb8e

Please sign in to comment.