Commit 534806aa authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

New path for Linux build.

parent 980fa05e
......@@ -63,11 +63,11 @@ else:
if platform == 'darwin':
# Mac OS X
warning_flags = clang_warning_flags
link_flags= ' -framework Accelerate '
link_flags= ['-framework Accelerate']
elif platform == 'posix':
# I implicitly assume here the compiler is gcc; later on there should be a check upon the compiler used.
warning_flags = gcc_warning_flags
link_flags= ' -llapack -lblas '
link_flags= ['-llapack', '-lblas', '-ldl']
else:
print "[ERROR] Platform ({0}) configuration is not yet foreseen in Scons script. Please add it!".format(platform)
......@@ -80,6 +80,8 @@ env.Append(CPPDEFINES=macro_flags)
env.Append(LINKFLAGS=link_flags)
# Check whether all variables in command line are known or not.
unknown = vars.UnknownVariables()
if unknown:
......@@ -137,8 +139,7 @@ def InstallExecutable(target, source, env):
Copy the executable into the install folder.
See InstallDynamicLibrary() for a more thorough explanation of each term.
"""
"""
# Copy the executable file
assert(len(source) == 1)
......@@ -148,6 +149,8 @@ def InstallExecutable(target, source, env):
target_name = str(target[0])
Execute(Copy(target_name, src_name))
# List of include directories.
include_dirs = [
......@@ -226,6 +229,7 @@ libraries = ('Utilities', 'Core', 'Geometry', 'FiniteElement', 'Solver')
# List of all libraries, as strings without path. For instance ['libhappy_heart_utilities.dylib', 'libhappy_heart_core.dylib'].
happy_heart_libs = []
all_libs = copy.copy(libs)
all_libs.extend(link_flags)
# Iterate through the SConscript of all the libraries to build.
for library in libraries:
......@@ -251,12 +255,12 @@ list_exec = SConscript('Problems/SConscript',
variant_dir=os.path.join(intermediate_variant_directory, 'Problems'),
duplicate=0)
list_test_exec = SConscript('Test/SConscript',
exports=(['env', 'all_libs']),
variant_dir=os.path.join(intermediate_variant_directory, 'Tests'),
duplicate=0)
#list_test_exec = SConscript('Test/SConscript',
# exports=(['env', 'all_libs']),
# variant_dir=os.path.join(intermediate_variant_directory, 'Tests'),
# duplicate=0)
list_exec.extend(list_test_exec)
#list_exec.extend(list_test_exec)
# Install each executable in the final build folder.
......
......@@ -16,8 +16,6 @@ main_src = Split('''
main_test.cpp
''')
print all_libs
print env['LIBPATH']
test = env.Program('test', main_src,
LIBS=all_libs,
......
# Choose C and C++ compilers.
CC = '/usr/bin/gcc'
CXX = '/usr/bin/g++'
CC = '/opt/Library/Openmpi/bin/mpicc'
CXX = '/opt/Library/Openmpi/bin/mpicxx'
# Choose either 'debug' or 'release'.
MODE='debug'
# OpenMPI libary.
OPEN_MPI_INCL='/opt/Library/g++/Openmpi/include'
OPEN_MPI_LIB='/opt/Library/g++/Openmpi/lib'
OPEN_MPI_INCL='/opt/Library/Openmpi/include'
OPEN_MPI_LIB='/opt/Library/Openmpi/lib'
# Petsc library.
PETSC_GENERAL_INCL='/opt/Library/Source/Petsc/include'
PETSC_DEBUG_INCL='/opt/Library/Source/Petsc/debug/include'
#PETSC_RELEASE_INCL='/opt/Library/Source/Petsc/release/include'
PETSC_GENERAL_INCL='/opt/Library/Petsc/include'
PETSC_DEBUG_INCL='/opt/Library/Petsc/debug/include'
#PETSC_RELEASE_INCL='/opt/Library/Petsc/release/include'
PETSC_DEBUG_LIB='/opt/Library/Source/Petsc/debug//lib'
#PETSC_RELEASE_LIB='/opt/Library/g++/Petsc/release/lib'
PETSC_DEBUG_LIB='/opt/Library/Petsc/debug/lib'
#PETSC_RELEASE_LIB='/opt/Library/Petsc/release/lib'
# Parmetis library.
PARMETIS_INCL='/opt/Library/Source/Parmetis/include'
PARMETIS_LIB='/opt/Library/g++/Parmetis/lib'
PARMETIS_INCL='/opt/Library/Parmetis/include'
PARMETIS_LIB='/opt/Library/Parmetis/lib'
# Lua library.
LUA_INCL='/opt/Library/Source/Lua/include'
LUA_LIB='/opt/Library/Source/Lua/lib'
LUA_INCL='/opt/Library/Lua/include'
LUA_LIB='/opt/Library/Lua/lib'
# Yuni library.
YUNI_INCL='/opt/Library/Source//Yuni/src'
YUNI_LIB='/opt/Library/Source//Yuni/src/build/debug/lib'
YUNI_INCL='/opt/Library//Yuni/src'
YUNI_LIB='/opt/Library//Yuni/src/build/debug/lib'
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