From c76b79f02141f9329caeeecf0b3a5ce84ec216bf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jun 2019 19:36:28 -0400 Subject: [PATCH 1/3] chance test for OpenMP default setting to be compatible with CMake 2.8.x --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c572d6f27a..8ad1011398 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -322,7 +322,7 @@ find_package(OpenMP QUIET) # where we assume older GCC semantics. For the time being, we disable OpenMP by default # for GCC 9.x and beyond. People may manually turn it on, but need to run the script # src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9. -if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0.0)) +if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) option(BUILD_OMP "Build with OpenMP support" OFF) else() option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND}) From 5d96ecff254fff90fc9fbdb8afd0dc418e1ad99d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jun 2019 19:44:40 -0400 Subject: [PATCH 2/3] fix typo --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 8ad1011398..99111c9d5c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -322,7 +322,7 @@ find_package(OpenMP QUIET) # where we assume older GCC semantics. For the time being, we disable OpenMP by default # for GCC 9.x and beyond. People may manually turn it on, but need to run the script # src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9. -if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) +if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 8.99.9)) option(BUILD_OMP "Build with OpenMP support" OFF) else() option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND}) From 021f0c1fc601549fba5c6db34d03593d4fa6becc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jun 2019 19:50:48 -0400 Subject: [PATCH 3/3] use consistent variable evaluation in if() --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 99111c9d5c..58f3ccad23 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -322,7 +322,7 @@ find_package(OpenMP QUIET) # where we assume older GCC semantics. For the time being, we disable OpenMP by default # for GCC 9.x and beyond. People may manually turn it on, but need to run the script # src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9. -if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 8.99.9)) +if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9)) option(BUILD_OMP "Build with OpenMP support" OFF) else() option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})