FHU: Fixes syscall helper caching

check_cxx_source_compiles caches by variable name, so `compiles` was
getting cached and breaking future checks.
This commit is contained in:
Ryan Houdek committed 2023-09-18 17:05:40 -07:00
1 parent 3b188b7f49
commit da21fc937b
1 file changed
+10 -10
+10 -10
View File
@@ -7,8 +7,8 @@ check_cxx_source_compiles(
int main() {
return ::getcpu(nullptr, nullptr);
}"
compiles)
if (compiles)
HAS_SYSCALL_GETCPU)
if (HAS_SYSCALL_GETCPU)
message(STATUS "Has getcpu helper")
target_compile_definitions(FEXHeaderUtils INTERFACE HAS_SYSCALL_GETCPU=1)
endif ()
@@ -19,8 +19,8 @@ check_cxx_source_compiles(
int main() {
return ::gettid();
}"
compiles)
if (compiles)
HAS_SYSCALL_GETTID)
if (HAS_SYSCALL_GETTID)
message(STATUS "Has gettid helper")
target_compile_definitions(FEXHeaderUtils INTERFACE HAS_SYSCALL_GETTID=1)
endif ()
@@ -31,8 +31,8 @@ check_cxx_source_compiles(
int main() {
return ::tgkill(0, 0, 0);
}"
compiles)
if (compiles)
HAS_SYSCALL_TGKILL)
if (HAS_SYSCALL_TGKILL)
message(STATUS "Has tgkill helper")
target_compile_definitions(FEXHeaderUtils INTERFACE HAS_SYSCALL_TGKILL=1)
endif ()
@@ -43,8 +43,8 @@ check_cxx_source_compiles(
int main() {
return ::statx(0, nullptr, 0, 0, nullptr);
}"
compiles)
if (compiles)
HAS_SYSCALL_STATX)
if (HAS_SYSCALL_STATX)
message(STATUS "Has statx helper")
target_compile_definitions(FEXHeaderUtils INTERFACE HAS_SYSCALL_STATX=1)
endif ()
@@ -55,8 +55,8 @@ check_cxx_source_compiles(
int main() {
return ::renameat2(0, nullptr, 0, nullptr, 0);
}"
compiles)
if (compiles)
HAS_SYSCALL_RENAMEAT2)
if (HAS_SYSCALL_RENAMEAT2)
message(STATUS "Has renameat2 helper")
target_compile_definitions(FEXHeaderUtils INTERFACE HAS_SYSCALL_RENAMEAT2=1)
endif ()