From 5dc77b6c51502e0308307f59f761a4efeee34726 Mon Sep 17 00:00:00 2001
From: Vasileios Karakasis <vkarak@gmail.com>
Date: Thu, 21 Sep 2017 14:27:08 +0200
Subject: [PATCH] Conditionally compile AVX2 transcendentals unit tests (#355)

Only compile AVX2 intrinsics unit tests if NMC_VECTORIZE_TARGET=AVX2 is defined.

Fixes #351.
---
 tests/unit/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
index 4216a5c6..edc6a182 100644
--- a/tests/unit/CMakeLists.txt
+++ b/tests/unit/CMakeLists.txt
@@ -47,7 +47,6 @@ set(TEST_SOURCES
     test_event_binner.cpp
     test_filter.cpp
     test_fvm_multi.cpp
-    #test_intrin.cpp
     test_mc_cell_group.cpp
     test_lexcmp.cpp
     test_mask_stream.cpp
@@ -87,6 +86,9 @@ set(TEST_SOURCES
     stats.cpp
 )
 
+if(NMC_VECTORIZE_TARGET STREQUAL "AVX2")
+    list(APPEND TEST_SOURCES test_intrin.cpp)
+endif()
 
 set(TARGETS test.exe)
 
-- 
GitLab