File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ if(POLICY CMP0051)
95
95
cmake_policy (SET CMP0051 NEW )
96
96
endif ()
97
97
98
+ if (POLICY CMP0056 )
99
+ cmake_policy (SET CMP0056 NEW )
100
+ endif ()
101
+
98
102
include (cmake/OpenCVUtils.cmake )
99
103
100
104
# must go before the project command
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
192
192
if (ENABLE_COVERAGE )
193
193
set (OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} --coverage" )
194
194
set (OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} --coverage" )
195
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage" )
195
196
endif ()
196
197
197
198
if (ENABLE_INSTRUMENTATION )
Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
260
260
TRY_COMPILE (${RESULT}
261
261
"${CMAKE_BINARY_DIR} "
262
262
"${_fname} "
263
+ CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS} " # CMP0056 do this on new CMake
263
264
COMPILE_DEFINITIONS "${FLAG} "
264
265
OUTPUT_VARIABLE OUTPUT )
265
266
You can’t perform that action at this time.
0 commit comments