From 511f24693be2356f4d2bff4811db2bfbb20c8438 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 27 Aug 2020 14:51:02 +0200 Subject: [PATCH] Fix for CUDA compiler --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d6d49f2a..f67327280 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3028,7 +3028,9 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) add_compile_options(-mtune=native) endif() else() - add_compile_options(-march=native) + if(NOT ENABLE_CUDA) + add_compile_options(-march=native) + endif() endif() endif() endif()