Bypass inline asm for non compatible compilers.

This commit is contained in:
Gael Guennebaud 2019-01-23 23:43:13 +01:00
parent e16913a45f
commit c64d5d3827
2 changed files with 4 additions and 1 deletions

View File

@ -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}>

View File

@ -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>