Mentions légales du service

Skip to content
Snippets Groups Projects
SConstruct 1.94 KiB
#vars = Variables(None, ARGUMENTS)
#vars.Add('NBVARS', 'Sets the number of variables', 2)

debug = ARGUMENTS.get('debug', 0)

env = Environment(  #variables = vars,
                    CXX = 'g++',
                    CXXFLAGS = Split('-I./include -I./src \
                    -march=native -mtune=native -std=gnu++14 -fabi-version=6 \
                      -fpermissive -Wall -Wextra -fopenmp'),
                    LIBPATH = '#lib/',
                    LIBS = Split('-lopenblas -lgivaro -lgmpxx -lgmp'),
                    LINKFLAGS = '-fopenmp',
                    SRC_CC = ['#src/finite_field_arithmetic/givaro_wrapper.cc',
                     	      '#src/logger.cc', 
                              '#src/monomial.cc',
                              '#src/select_reductors.cc',
                              '#src/critical_pair.cc',
                              '#src/polynomial_in_matrix.cc',
                              '#src/polynomial.cc',
                              '#src/matrices/io_utils.cc',
                              '#src/matrices/spmat.cc',
                              '#src/utils.cc', 
                              '#src/linalg/storage_matrix.cc', 
                              '#src/glob_params.cc',
                              '#src/matrices/rowmajmat.cc']
)

#Help(vars.GenerateHelpText(env))

if int(debug):
    env.Append(CXXFLAGS = Split('-g -O0'))
else:
    env.Append(CXXFLAGS = Split('-O3 -DNDEBUG -funroll-loops'))

#env.Append(CPPDEFINES = {'_TINYGB_NB_VAR' : '${NBVARS}'})
env.Append(CXXFLAGS = ['-pedantic'])
env.Append(CXXFLAGS = ['-Werror'])
env.Append(CXXFLAGS = ['-fdiagnostics-color=always'])

# To silence some warnings produced by fflas-ffpack which cannot be silenced by
# using pragmas
env.Append(CXXFLAGS = ['-Wno-variadic-macros'])
# Warning raised by GCC 9
env.Append(CXXFLAGS = ['-Wno-deprecated-copy'])
env.Append(CXXFLAGS = ['-Wno-extra'])

Export('env');
SConscript('src/SConscript', variant_dir='build', duplicate=0)