mdbx-cmake: корректировка пробы OpenMP.
This commit is contained in:
parent
dc6f29a046
commit
8571eac81b
|
@ -368,13 +368,15 @@ else()
|
||||||
set(CMAKE_REQUIRED_FLAGS "-fopenmp -Werror")
|
set(CMAKE_REQUIRED_FLAGS "-fopenmp -Werror")
|
||||||
if(CMAKE_CXX_COMPILER_LOADED)
|
if(CMAKE_CXX_COMPILER_LOADED)
|
||||||
check_cxx_source_compiles("int main(void) {
|
check_cxx_source_compiles("int main(void) {
|
||||||
#pragma omp parallel
|
#pragma omp for
|
||||||
return 0;
|
for(int i = 0, j = 0; i != 42; i = 1 + i * 12345) j += i % 43;
|
||||||
|
return j;
|
||||||
}" HAVE_OPENMP)
|
}" HAVE_OPENMP)
|
||||||
else()
|
else()
|
||||||
check_c_source_compiles("int main(void) {
|
check_c_source_compiles("int main(void) {
|
||||||
#pragma omp parallel
|
#pragma omp for
|
||||||
return 0;
|
for(int i = 0, j = 0; i != 42; i = 1 + i * 12345) j += i % 43;
|
||||||
|
return j;
|
||||||
}" HAVE_OPENMP)
|
}" HAVE_OPENMP)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_REQUIRED_FLAGS "")
|
set(CMAKE_REQUIRED_FLAGS "")
|
||||||
|
|
Loading…
Reference in New Issue