aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/g2o/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/g2o/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/g2o/default.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/g2o/default.nix b/nixpkgs/pkgs/development/libraries/g2o/default.nix
index 7167112b6bd..675d994cf0e 100644
--- a/nixpkgs/pkgs/development/libraries/g2o/default.nix
+++ b/nixpkgs/pkgs/development/libraries/g2o/default.nix
@@ -27,16 +27,13 @@ mkDerivation rec {
# Detection script is broken
"-DQGLVIEWER_INCLUDE_DIR=${libqglviewer}/include/QGLViewer"
"-DG2O_BUILD_EXAMPLES=OFF"
- ] ++ lib.optionals stdenv.isx86_64 ([ "-DDO_SSE_AUTODETECT=OFF" ] ++ {
- default = [ "-DDISABLE_SSE3=ON" "-DDISABLE_SSE4_1=ON" "-DDISABLE_SSE4_2=ON" "-DDISABLE_SSE4_A=ON" ];
- westmere = [ "-DDISABLE_SSE4_A=ON" ];
- sandybridge = [ "-DDISABLE_SSE4_A=ON" ];
- ivybridge = [ "-DDISABLE_SSE4_A=ON" ];
- haswell = [ "-DDISABLE_SSE4_A=ON" ];
- broadwell = [ "-DDISABLE_SSE4_A=ON" ];
- skylake = [ "-DDISABLE_SSE4_A=ON" ];
- skylake-avx512 = [ "-DDISABLE_SSE4_A=ON" ];
- }.${stdenv.hostPlatform.platform.gcc.arch or "default"});
+ ] ++ lib.optionals stdenv.isx86_64 [
+ "-DDO_SSE_AUTODETECT=OFF"
+ "-DDISABLE_SSE3=${ if stdenv.hostPlatform.sse3Support then "OFF" else "ON"}"
+ "-DDISABLE_SSE4_1=${if stdenv.hostPlatform.sse4_1Support then "OFF" else "ON"}"
+ "-DDISABLE_SSE4_2=${if stdenv.hostPlatform.sse4_2Support then "OFF" else "ON"}"
+ "-DDISABLE_SSE4_A=${if stdenv.hostPlatform.sse4_aSupport then "OFF" else "ON"}"
+ ];
meta = with lib; {
description = "A General Framework for Graph Optimization";