diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-01-23 23:43:13 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-01-23 23:43:13 +0100 |
commit | c64d5d3827f8d1ab0f33198721862115efe871da (patch) | |
tree | 97899a3566b8ec9ffa4fca2f6351d063ce4ae17a | |
parent | e16913a45f92db9d4080c06515537ee287fdb153 (diff) |
Bypass inline asm for non compatible compilers.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | bench/BenchTimer.h | 4 |
2 files changed, 4 insertions, 1 deletions
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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> 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 <Eigen/Core> |