diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-01-28 17:55:06 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-01-28 17:55:06 (GMT) |
commit | d38c0de82f632fac4f7609ca480616f258a78106 (patch) | |
tree | 3007e8701298e783633611baf9e2dfe87c24f33a /Modules/FindOpenMP.cmake | |
parent | 0dd0e2d6e6c1600a85a20d74303b8474530534e3 (diff) | |
download | CMake-d38c0de82f632fac4f7609ca480616f258a78106.zip CMake-d38c0de82f632fac4f7609ca480616f258a78106.tar.gz CMake-d38c0de82f632fac4f7609ca480616f258a78106.tar.bz2 |
ENH: clean up status and change order for more common compilers first
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r-- | Modules/FindOpenMP.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index faba123..848f57f 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -23,12 +23,16 @@ include(CheckCXXSourceCompiles) include(FindPackageHandleStandardArgs) set(OpenMP_C_FLAG_CANDIDATES - #Empty, if compiler automatically accepts openmp - " " + #Gnu + "-fopenmp" + #Microsoft Visual Studio + "/openmp" #Intel windows "-Qopenmp" #Intel "-openmp" + #Empty, if compiler automatically accepts openmp + " " #Sun "-xopenmp" #HP @@ -37,10 +41,6 @@ set(OpenMP_C_FLAG_CANDIDATES "-qsmp" #Portland Group "-mp" - #Gnu - "-fopenmp" - #Microsoft Visual Studio - "/openmp" ) set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES}) @@ -49,7 +49,7 @@ set(OpenMP_C_TEST_SOURCE " #include <omp.h> int main() { -#ifdef _OpenMP +#ifdef _OPENMP return 0; #else breaks_on_purpose @@ -70,7 +70,7 @@ foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES}) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) - message(STATUS "Try OpenMP flag = [${FLAG}]") + message(STATUS "Try OpenMP C flag = [${FLAG}]") check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED) set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") if(OpenMP_FLAG_DETECTED) @@ -84,7 +84,7 @@ foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES}) set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") set(CMAKE_REQUIRED_FLAGS "${FLAG}") unset(OpenMP_FLAG_DETECTED CACHE) - message(STATUS "Try OpenMP flag = [${FLAG}]") + message(STATUS "Try OpenMP CXX flag = [${FLAG}]") check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED) set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") if(OpenMP_FLAG_DETECTED) |