Salome HOME
initial commit : transfert of salome configuration files from internal git base
[tools/sat_salome.git] / products / patches / opencv-3.2.0-ccache.patch
1 --- opencv_ref/cmake/OpenCVCompilerOptions.cmake        2019-07-16 15:47:28.000000000 +0200
2 +++ opencv/cmake/OpenCVCompilerOptions.cmake    2019-07-18 11:27:06.006424613 +0200
3 @@ -6,7 +6,7 @@ if(ENABLE_CCACHE AND NOT CMAKE_COMPILER_
4      get_property(__OLD_RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
5      if(__OLD_RULE_LAUNCH_COMPILE)
6        message(STATUS "Can't replace CMake compiler launcher")
7 -    else()
8 +    else(__OLD_RULE_LAUNCH_COMPILE)
9        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
10        # NOTE: Actually this check doesn't work as expected.
11        # "RULE_LAUNCH_COMPILE" is ignored by CMake during try_compile() step.
12 @@ -14,14 +14,14 @@ if(ENABLE_CCACHE AND NOT CMAKE_COMPILER_
13        set(IS_CCACHE_WORKS 1)
14        if(IS_CCACHE_WORKS)
15          set(CMAKE_COMPILER_IS_CCACHE 1)
16 -      else()
17 +      else(IS_CCACHE_WORKS)
18          message(STATUS "Unable to compile program with enabled ccache, reverting...")
19          set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${__OLD_RULE_LAUNCH_COMPILE}")
20 -      endif()
21 -    else()
22 -      message(STATUS "Looking for ccache - not found")
23 -    endif()
24 -  endif()
25 +      endif(IS_CCACHE_WORKS)
26 +    endif(__OLD_RULE_LAUNCH_COMPILE)
27 +  else(CCACHE_PROGRAM)
28 +    message(STATUS "Looking for ccache - not found")
29 +  endif(CCACHE_PROGRAM)
30  endif()
31  
32  if((CMAKE_COMPILER_IS_CLANGCXX OR CMAKE_COMPILER_IS_CLANGCC OR CMAKE_COMPILER_IS_CCACHE) AND NOT CMAKE_GENERATOR MATCHES "Xcode")