From 55a0dd36f4a934f6a89546741d7cd6cde64bda28 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Wed, 16 Feb 2022 22:02:50 +0100
Subject: [PATCH] FIX: Remove the buggy try_compile thing to test for OpenMP

---
 CMakeLists.txt           | 12 ------------
 utils/cmake/TestOpenMP.c | 14 --------------
 2 files changed, 26 deletions(-)
 delete mode 100644 utils/cmake/TestOpenMP.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c7af52e..f56e496f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,18 +233,6 @@ set(SQL_SOURCE_FILES
 # TEST OPENMP #
 ###         ###
 
-try_compile(OPENMP_SUPPORT_OK
-    ${CMAKE_BINARY_DIR}/___openmp_test_ok
-    ${CMAKE_CURRENT_SOURCE_DIR}/utils/cmake/TestOpenMP.c}
-    LINK_LIBRARIES -fopenmp
-)
-
-if(OPENMP_SUPPORT_OK)
-    message(STATUS "Compiler has OpenMP support (test program compiles)")
-else()
-    message(FATAL_ERROR "Compiler doesn't have OpenMP support (test program doesn't compile)")
-endif()
-
 if(OpenMP_FOUND)
     message(STATUS "OpenMP found by CMake for C and C++")
 else()
diff --git a/utils/cmake/TestOpenMP.c b/utils/cmake/TestOpenMP.c
deleted file mode 100644
index 63c7d73b..00000000
--- a/utils/cmake/TestOpenMP.c
+++ /dev/null
@@ -1,14 +0,0 @@
-int
-main(void)
-{
-    int res = 0;
-    int A[10];
-    memset(&A, 1, sizeof(A));
-
-    #pragma omp parallel for shared(A, res) reduction (+res)
-    for (int i = 0; i < 10; i += 1) {
-        res += A[i]
-    }
-
-    return res;
-}
\ No newline at end of file
-- 
GitLab