File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ if (IA32 OR INTEL64)
175175 }
176176 int main() { int a = __kmp_umwait(0, 1000); return a; }" )
177177 check_cxx_source_compiles("${source_code} " LIBOMP_HAVE_WAITPKG_INTRINSICS)
178+ set (OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} )
179+ if (LIBOMP_HAVE_MRTM_FLAG)
180+ set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -mrtm" )
181+ endif ()
178182 set (source_code "// check for attribute rtm and rtm intrinsics
179183 #ifdef IMMINTRIN_H
180184 #include <immintrin.h>
@@ -191,6 +195,7 @@ if (IA32 OR INTEL64)
191195 int main() { int a = __kmp_xbegin(); return a; }" )
192196 check_cxx_source_compiles("${source_code} " LIBOMP_HAVE_RTM_INTRINSICS)
193197 set (CMAKE_REQUIRED_DEFINITIONS)
198+ set (CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS} )
194199endif ()
195200
196201# Find perl executable
You can’t perform that action at this time.
0 commit comments