Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
4bd1e3dc
Commit
4bd1e3dc
authored
Dec 30, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: avoid timestamp change of version_string.inc file
parent
30373d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+16
-3
No files found.
cmake/OpenCVUtils.cmake
View file @
4bd1e3dc
...
@@ -519,16 +519,29 @@ endmacro()
...
@@ -519,16 +519,29 @@ endmacro()
if
(
NOT DEFINED CMAKE_ARGC
)
# Guard CMake standalone invocations
if
(
NOT DEFINED CMAKE_ARGC
)
# Guard CMake standalone invocations
set
(
OPENCV_BUILD_INFO_FILE
"
${
CMAKE_BINARY_DIR
}
/version_string.tmp"
)
set
(
OPENCV_BUILD_INFO_STR
""
CACHE INTERNAL
""
)
file
(
REMOVE
"
${
OPENCV_BUILD_INFO_FILE
}
"
)
function
(
ocv_output_status msg
)
function
(
ocv_output_status msg
)
message
(
STATUS
"
${
msg
}
"
)
message
(
STATUS
"
${
msg
}
"
)
string
(
REPLACE
"
\\
"
"
\\\\
"
msg
"
${
msg
}
"
)
string
(
REPLACE
"
\\
"
"
\\\\
"
msg
"
${
msg
}
"
)
string
(
REPLACE
"
\"
"
"
\\\"
"
msg
"
${
msg
}
"
)
string
(
REPLACE
"
\"
"
"
\\\"
"
msg
"
${
msg
}
"
)
file
(
APPEND
"
${
OPENCV_BUILD_INFO_FILE
}
"
"
\"
${
msg
}
\\
n
\"\n
"
)
set
(
OPENCV_BUILD_INFO_STR
"
${
OPENCV_BUILD_INFO_STR
}
\"
${
msg
}
\\
n
\"\n
"
CACHE INTERNAL
"
"
)
endfunction
()
endfunction
()
macro
(
ocv_finalize_status
)
macro
(
ocv_finalize_status
)
set
(
OPENCV_BUILD_INFO_FILE
"
${
CMAKE_BINARY_DIR
}
/version_string.tmp"
)
if
(
EXISTS
"
${
OPENCV_BUILD_INFO_FILE
}
"
)
file
(
READ
"
${
OPENCV_BUILD_INFO_FILE
}
"
__content
)
else
()
set
(
__content
""
)
endif
()
if
(
"
${
__content
}
"
STREQUAL
"
${
OPENCV_BUILD_INFO_STR
}
"
)
#message(STATUS "${OPENCV_BUILD_INFO_FILE} contains the same content")
else
()
file
(
WRITE
"
${
OPENCV_BUILD_INFO_FILE
}
"
"
${
OPENCV_BUILD_INFO_STR
}
"
)
endif
()
unset
(
__content
)
unset
(
OPENCV_BUILD_INFO_STR CACHE
)
if
(
NOT OPENCV_SKIP_STATUS_FINALIZATION
)
if
(
NOT OPENCV_SKIP_STATUS_FINALIZATION
)
if
(
DEFINED OPENCV_MODULE_opencv_core_BINARY_DIR
)
if
(
DEFINED OPENCV_MODULE_opencv_core_BINARY_DIR
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
"
${
OPENCV_BUILD_INFO_FILE
}
"
"
${
OPENCV_MODULE_opencv_core_BINARY_DIR
}
/version_string.inc"
OUTPUT_QUIET
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
"
${
OPENCV_BUILD_INFO_FILE
}
"
"
${
OPENCV_MODULE_opencv_core_BINARY_DIR
}
/version_string.inc"
OUTPUT_QUIET
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment