Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
3656ce7e
Commit
3656ce7e
authored
May 22, 2010
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: cmake warns of local file modifications
parent
1666add3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
CMake/FindMercurial.cmake
CMake/FindMercurial.cmake
+6
-0
CMakeLists.txt
CMakeLists.txt
+6
-0
No files found.
CMake/FindMercurial.cmake
View file @
3656ce7e
...
...
@@ -36,6 +36,12 @@ IF(Mercurial_HG_EXECUTABLE)
RESULT_VARIABLE Mercurial_hg_identify_result
OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS
(
COMMAND
${
Mercurial_HG_EXECUTABLE
}
status -m
${
dir
}
OUTPUT_VARIABLE
${
prefix
}
_WC_STATUS
ERROR_VARIABLE Mercurial_hg_status_error
RESULT_VARIABLE Mercurial_hg_status_result
OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
MESSAGE
(
SEND_ERROR
"Command
\"
${
Mercurial_HG_EXECUTABLE
}
identify
${
dir
}
\"
failed with output:
\n
${
Mercurial_hg_identify_error
}
"
)
ELSE
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
...
...
CMakeLists.txt
View file @
3656ce7e
...
...
@@ -76,6 +76,12 @@ IF(Mercurial_FOUND)
MESSAGE
(
"Mercurial version is
${
Mercurial_VERSION_HG
}
"
)
MESSAGE
(
"Repository revision is
${
OTB_WC_REVISION
}
"
)
SET
(
OTB_VERSION_STRING
"
${
OTB_VERSION_MAJOR
}
.
${
OTB_VERSION_MINOR
}
.
${
OTB_VERSION_PATCH
}
.
${
OTB_WC_REVISION
}
"
)
IF
(
OTB_WC_STATUS
)
MESSAGE
(
"Local file modifications:"
)
MESSAGE
(
${
OTB_WC_STATUS
}
)
ELSE
(
OTB_WC_STATUS
)
MESSAGE
(
"No files modified locally"
)
ENDIF
(
OTB_WC_STATUS
)
ELSE
(
Mercurial_FOUND
)
# Version string should not include patch level. The major.minor is
# enough to distinguish available features of the toolkit.
...
...
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