From c64d5d3827f8d1ab0f33198721862115efe871da Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 23 Jan 2019 23:43:13 +0100 Subject: Bypass inline asm for non compatible compilers. --- CMakeLists.txt | 1 - bench/BenchTimer.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48c0a6367..76e083314 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -567,7 +567,6 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.0) # Imported target support add_library (eigen INTERFACE) add_library (Eigen3::Eigen ALIAS eigen) - target_compile_definitions (eigen INTERFACE ${EIGEN_DEFINITIONS}) target_include_directories (eigen INTERFACE $ diff --git a/bench/BenchTimer.h b/bench/BenchTimer.h index ea28496b7..8a0dbbe81 100644 --- a/bench/BenchTimer.h +++ b/bench/BenchTimer.h @@ -28,11 +28,15 @@ #endif static void escape(void *p) { +#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG asm volatile("" : : "g"(p) : "memory"); +#endif } static void clobber() { +#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG asm volatile("" : : : "memory"); +#endif } #include -- cgit v1.2.3