Commit 7df22c94 authored by partyd's avatar partyd
Browse files

BUG: Simplify the logic evaluating if we will enable the fstack flags and fix some comparison bugs.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15674 3bd1e089-480b-0410-8dfb-8563597acbee
parent e9c7bbd6
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
PROJECT(Slicer) PROJECT(Slicer)
...@@ -205,7 +205,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ...@@ -205,7 +205,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
# With older version of gcc supporting the flag -fstack-protector-all, an extra dependency to libssp.so # With older version of gcc supporting the flag -fstack-protector-all, an extra dependency to libssp.so
# is introduced. If gcc is smaller than 4.4.0 and the build type is Release let's not include the flag. # is introduced. If gcc is smaller than 4.4.0 and the build type is Release let's not include the flag.
# Doing so should allow to build package made for distribution using older linux distro. # Doing so should allow to build package made for distribution using older linux distro.
IF(GCC_VERSION VERSION_LESS "4.4.0" AND DEFINED CMAKE_BUILD_TYPE AND CMAKE_BUILD_TYPE STREQUAL "Release") message("GCC_VERSION ${GCC_VERSION}")
IF(GCC_VERSION VERSION_GREATER "4.4.0" OR (CMAKE_BUILD_TYPE STREQUAL "Debug" AND GCC_VERSION VERSION_LESS "4.4.0"))
SlicerFunctionCheckCompilerFlags("-fstack-protector-all" cflags) SlicerFunctionCheckCompilerFlags("-fstack-protector-all" cflags)
ENDIF() ENDIF()
IF(MINGW) IF(MINGW)
......
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