Skip to content
Snippets Groups Projects
Commit 394482a5 authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Merge branch 'OptimisationFineTuning-1.0-20170410' into '1.0'

Optimisation Fine Tuning, 1.0 branch (2017.04.10.)

See merge request !23
parents 231345a1 b257c694
No related branches found
Tags 1.0.6
No related merge requests found
......@@ -54,8 +54,41 @@ add_definitions( -DHAVE_64_BITS -D__IDENTIFIER_64BIT__ )
# Flag showing that we are building ATLAS code:
add_definitions( -DATLAS )
# A hopefully temporary flag showing that we use Gaudi's Hive version:
#add_definitions( -DATHENAHIVE )
# Set default values for the optimisation settings, ones that could
# be overridden from the command line.
if( CMAKE_COMPILER_IS_GNUCXX )
# Provide custom defaults for GCC. The only modification wrt. the
# CMake default values, at the time of writing, is to use -O2 for release
# mode instead of -O3.
set( ATLAS_CXX_FLAGS_RELEASE "-DNDEBUG -O2"
CACHE STRING "Default optimisation settings for Release mode" )
set( ATLAS_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g"
CACHE STRING "Default optimisation settings for RelWithDebInfo mode" )
set( ATLAS_CXX_FLAGS_DEBUG "-g"
CACHE STRING "Default optimisation settings for Release mode" )
else()
# For all other compilers just accept the CMake defaults.
set( ATLAS_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}"
CACHE STRING "Default optimisation settings for Release mode" )
set( ATLAS_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "Default optimisation settings for RelWithDebInfo mode" )
set( ATLAS_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}"
CACHE STRING "Default optimisation settings for Release mode" )
endif()
# Override the default values forcefully. Since by this time the cache
# values have already been set by CMake.
set( CMAKE_CXX_FLAGS_RELEASE "${ATLAS_CXX_FLAGS_RELEASE}"
CACHE STRING "Default optimisation settings for Release mode" FORCE )
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${ATLAS_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "Default optimisation settings for RelWithDebInfo mode" FORCE )
set( CMAKE_CXX_FLAGS_DEBUG "${ATLAS_CXX_FLAGS_DEBUG}"
CACHE STRING "Default optimisation settings for Release mode" FORCE )
# Function helping with extending global flags
function( _add_flag name value )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment