Skip to content

Commit

Permalink
Merge pull request oscar-system#109 from fingolfin/mh/build.jl
Browse files Browse the repository at this point in the history
build.jl: refactor how we invoke configure
  • Loading branch information
wbhart authored Jun 20, 2019
2 parents cd9e4e6 + fe1edaa commit da900e3
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,29 @@ end

cd(joinpath(wdir, "Singular_build"))
withenv("CPP_FLAGS"=>"-I$vdir/include", "LD_LIBRARY_PATH"=>"$vdir/lib:$nemodir/lib") do
if !debug_build
run(`$srcs/configure --prefix=$vdir --disable-static --enable-p-procs-static --disable-p-procs-dynamic --disable-gfanlib --enable-shared --with-gmp=$nemovdir --with-flint=$nemovdir --with-ntl=$vdir --without-python --with-readline=no`)
else
run(`$srcs/configure --prefix=$vdir --disable-static --enable-p-procs-static --disable-p-procs-dynamic --disable-gfanlib --enable-shared --with-gmp=$nemovdir --with-flint=$nemovdir --with-ntl=$vdir --without-python --with-readline=no --with-debug --enable-debug --disable-optimizationflags`)
end
cmd = split(
"""
$srcs/configure
--prefix=$vdir
--disable-static
--enable-p-procs-static
--disable-p-procs-dynamic
--disable-gfanlib
--enable-shared
--with-gmp=$nemovdir
--with-flint=$nemovdir
--with-ntl=$vdir
--without-python
--with-readline=no
""", "\n", keepempty = false)
if debug_build
append!(cmd, [
"--with-debug",
"--enable-debug",
"--disable-optimizationflags",
])
end
run(Cmd(string.(cmd)))
withenv("LDFLAGS"=>LDFLAGS) do
run(`make -j4`)
run(`make install`)
Expand Down

0 comments on commit da900e3

Please sign in to comment.