about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/g2o/default.nix
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2020-08-05 02:32:41 +0000
committerAlyssa Ross <hi@alyssa.is>2020-11-27 13:28:22 +0000
commitbc030c028322c3797c351832ff2e41348351a223 (patch)
tree1338ec7ecc4c5d9941b419b1b83fe164e261f1b9 /nixpkgs/pkgs/development/libraries/g2o/default.nix
parent56a4b2b477a63be9bb1fd016dc9ccfc2bbebf600 (diff)
downloadnixlib-bc030c028322c3797c351832ff2e41348351a223.tar
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.gz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.bz2
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.lz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.xz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.zst
nixlib-bc030c028322c3797c351832ff2e41348351a223.zip
gcc.arch: refactor, move tables under lib/
(cherry picked from commit cf7b63df5b9efdef4e8e1b3261d7040199f7e671)
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 7167112b6bd1..675d994cf0e6 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";