mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-25 09:58:37 -05:00
FindOpenMP: Avoid warning in check code
The test code added by commit v3.12.0-rc1~411^2~1 (FindOpenMP: Verify in test source that OMP library is linked, 2018-03-01) leaves an unused variable warning. This breaks the check with `-Werror`. Remove the variable and leave just the function call, which should still check that the OMP library is linked. Fixes: #18102
This commit is contained in:
@@ -126,7 +126,7 @@ set(OpenMP_C_CXX_TEST_SOURCE
|
|||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
int main() {
|
int main() {
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
int n = omp_get_max_threads();
|
omp_get_max_threads();
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
breaks_on_purpose
|
breaks_on_purpose
|
||||||
|
|||||||
Reference in New Issue
Block a user