added cmake flag to prevent autodetection of SDK directory

This commit is contained in:
Allen Nelson 2015-05-27 12:40:44 -07:00
parent 8e4c911248
commit 6eb8ff878d

View File

@ -3,6 +3,7 @@ let
atlasMaybeShared = atlas.override { inherit shared; }; atlasMaybeShared = atlas.override { inherit shared; };
usedLibExtension = if shared then ".so" else ".a"; usedLibExtension = if shared then ".so" else ".a";
version = "3.4.1"; version = "3.4.1";
inherit (stdenv.lib) optional;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "liblapack-${version}"; name = "liblapack-${version}";
@ -21,7 +22,10 @@ stdenv.mkDerivation rec {
"-DBLAS_ATLAS_atlas_LIBRARY=${atlasMaybeShared}/lib/libatlas${usedLibExtension}" "-DBLAS_ATLAS_atlas_LIBRARY=${atlasMaybeShared}/lib/libatlas${usedLibExtension}"
"-DCMAKE_Fortran_FLAGS=-fPIC" "-DCMAKE_Fortran_FLAGS=-fPIC"
] ]
++ (stdenv.lib.optional shared "-DBUILD_SHARED_LIBS=ON") ++ (optional shared "-DBUILD_SHARED_LIBS=ON")
# If we're on darwin, CMake will automatically detect impure paths. This switch
# prevents that.
++ (optional stdenv.isDarwin "-DCMAKE_OSX_SYSROOT:PATH=''")
; ;
doCheck = ! shared; doCheck = ! shared;