Commit a7279fa2 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1047 SCons: add variable with default values that may trigger clang static...

#1047 SCons: add variable with default values that may trigger clang static analyzer should the CC and CXX filed with ccc-analyzer and c++-analyzer.
parent 4594092f
......@@ -18,7 +18,7 @@ def ReadConfigurationFile(configuration_file):
vars = SCons.Variables.Variables(configuration_file)
vars.Add(SCons.Variables.EnumVariable('MODE', 'Whether you compile in debug or release mode.', \
'debug', \
allowed_values=('debug', 'release', )))
allowed_values=('debug', 'release')))
vars.Add(SCons.Variables.EnumVariable('LIBRARY_TYPE', 'Whether you want to use static or shared libraries.', None,
allowed_values=('static', 'shared', )))
......@@ -42,6 +42,10 @@ def ReadConfigurationFile(configuration_file):
vars.Add('CC', "C compiler", None)
vars.Add('CXX', "C++ compiler", None)
vars.Add('CCC_CC', "Option used only for clang-analyzer; points to C compiler.", "clang")
vars.Add('CCC_CXX', "Option used only for clang-analyzer; points to C++ compiler.", "clang++")
vars.Add('CCC_ANALYZER_VERBOSE', "Verbose mode for clang-analyzer", 1)
vars.Add(SCons.Variables.PathVariable('OPEN_MPI_INCL_DIR', "Includes of OpenMPI library.", None))
......
......@@ -244,8 +244,7 @@ def DefineEnvironment(vars):
env['YUNI_MODE_LIB_DIR'] = env['YUNI_DEBUG_LIB_DIR']
if env['MODE'] == 'full_debug':
macro_flags.append('HAPPY_HEART_CHECK_UPDATE_GHOSTS_CALL_RELEVANCE')
macro_flags.append('HAPPY_HEART_CHECK_UPDATE_GHOSTS_CALL_RELEVANCE')
else:
macro_flags.append('NDEBUG')
optimization_flags=['-O3', ]
......
......@@ -3,7 +3,7 @@
BUILD_DIR = ''
INTERMEDIATE_BUILD_DIR = ''
# Choose C and C++ compilers.
# Choose C and C++ compilers. You might also specifies here clang static analyzer (paths to ccc-analyzer and c++-analyzer respectively) to perform static analysis of the code.
COMPILER= 'gcc' # name used in output folders.
COMPILER_DIRECTORY = 'gcc'
CC = '/opt/LibraryVersions/gcc/5.3/Openmpi/bin/mpicc'
......
......@@ -3,7 +3,7 @@
BUILD_DIR = ''
INTERMEDIATE_BUILD_DIR = ''
# Choose C and C++ compilers.
# Choose C and C++ compilers. You might also specifies here clang static analyzer (paths to ccc-analyzer and c++-analyzer respectively) to perform static analysis of the code.
COMPILER= 'clang'
COMPILER_DIRECTORY = 'clang'
CC = '/Users/Shared/LibraryVersions/clang/Openmpi/bin/mpicc'
......
Supports Markdown
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