/[gentoo-x86]/dev-util/cmake/files/cmake-2.8.7-FindOpenMP.patch
Gentoo

Contents of /dev-util/cmake/files/cmake-2.8.7-FindOpenMP.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Sep 9 19:00:02 2012 UTC (23 months, 2 weeks ago) by johu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.0_alpha124/cvs/Linux x86_64)

1 http://public.kitware.com/Bug/view.php?id=11910
2 --- Modules/FindOpenMP.cmake 2011-03-01 17:34:59.000000000 +0900
3 +++ Modules/FindOpenMP.cmake 2011-03-01 17:35:26.000000000 +0900
4 @@ -72,41 +72,53 @@
5 endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
6
7 # check c compiler
8 -foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
9 - set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
10 - set(CMAKE_REQUIRED_FLAGS "${FLAG}")
11 - unset(OpenMP_FLAG_DETECTED CACHE)
12 - message(STATUS "Try OpenMP C flag = [${FLAG}]")
13 - check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
14 - set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
15 - if(OpenMP_FLAG_DETECTED)
16 - set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
17 - break()
18 - endif(OpenMP_FLAG_DETECTED)
19 -endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
20 +IF (CMAKE_C_COMPILER)
21 + foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
22 + set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
23 + set(CMAKE_REQUIRED_FLAGS "${FLAG}")
24 + unset(OpenMP_FLAG_DETECTED CACHE)
25 + message(STATUS "Try OpenMP C flag = [${FLAG}]")
26 + check_c_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
27 + set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
28 + if(OpenMP_FLAG_DETECTED)
29 + set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
30 + break()
31 + endif(OpenMP_FLAG_DETECTED)
32 + endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
33 +ENDIF (CMAKE_C_COMPILER)
34
35 # check cxx compiler
36 -foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
37 - set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
38 - set(CMAKE_REQUIRED_FLAGS "${FLAG}")
39 - unset(OpenMP_FLAG_DETECTED CACHE)
40 - message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
41 - check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
42 - set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
43 - if(OpenMP_FLAG_DETECTED)
44 - set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
45 - break()
46 - endif(OpenMP_FLAG_DETECTED)
47 -endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
48 +IF (CMAKE_CXX_COMPILER)
49 + foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
50 + set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
51 + set(CMAKE_REQUIRED_FLAGS "${FLAG}")
52 + unset(OpenMP_FLAG_DETECTED CACHE)
53 + message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
54 + check_cxx_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
55 + set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
56 + if(OpenMP_FLAG_DETECTED)
57 + set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
58 + break()
59 + endif(OpenMP_FLAG_DETECTED)
60 + endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
61 +ENDIF (CMAKE_CXX_COMPILER)
62
63 set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
64 CACHE STRING "C compiler flags for OpenMP parallization")
65
66 set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
67 CACHE STRING "C++ compiler flags for OpenMP parallization")
68 +
69 # handle the standard arguments for find_package
70 -find_package_handle_standard_args(OpenMP DEFAULT_MSG
71 - OpenMP_C_FLAGS OpenMP_CXX_FLAGS )
72 +IF (CMAKE_C_COMPILER)
73 + find_package_handle_standard_args(OpenMP DEFAULT_MSG
74 + OpenMP_C_FLAGS )
75 +ENDIF (CMAKE_C_COMPILER)
76 +
77 +IF (CMAKE_CXX_COMPILER)
78 + find_package_handle_standard_args(OpenMP DEFAULT_MSG
79 + OpenMP_CXX_FLAGS )
80 +ENDIF (CMAKE_CXX_COMPILER)
81
82 mark_as_advanced(
83 OpenMP_C_FLAGS

  ViewVC Help
Powered by ViewVC 1.1.20