mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Bypass inline asm for non compatible compilers.
This commit is contained in:
parent
e16913a45f
commit
c64d5d3827
@ -567,7 +567,6 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.0)
|
|||||||
# Imported target support
|
# Imported target support
|
||||||
add_library (eigen INTERFACE)
|
add_library (eigen INTERFACE)
|
||||||
add_library (Eigen3::Eigen ALIAS eigen)
|
add_library (Eigen3::Eigen ALIAS eigen)
|
||||||
|
|
||||||
target_compile_definitions (eigen INTERFACE ${EIGEN_DEFINITIONS})
|
target_compile_definitions (eigen INTERFACE ${EIGEN_DEFINITIONS})
|
||||||
target_include_directories (eigen INTERFACE
|
target_include_directories (eigen INTERFACE
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
@ -28,11 +28,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void escape(void *p) {
|
static void escape(void *p) {
|
||||||
|
#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
|
||||||
asm volatile("" : : "g"(p) : "memory");
|
asm volatile("" : : "g"(p) : "memory");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clobber() {
|
static void clobber() {
|
||||||
|
#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
|
||||||
asm volatile("" : : : "memory");
|
asm volatile("" : : : "memory");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user