Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
747bd8d6
Commit
747bd8d6
authored
Jul 14, 2010
by
Emmanuel Christophe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backed out changeset b55f3b8834f2
parent
7fafa359
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
19 deletions
+15
-19
CMake/FindMercurial.cmake
CMake/FindMercurial.cmake
+2
-4
CMakeLists.txt
CMakeLists.txt
+13
-15
No files found.
CMake/FindMercurial.cmake
View file @
747bd8d6
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
SET
(
Mercurial_FOUND FALSE
)
SET
(
Mercurial_FOUND FALSE
)
SET
(
Mercurial_HG_FOUND FALSE
)
SET
(
Mercurial_HG_FOUND FALSE
)
SET
(
Mercurial_HG_PROJECT FALSE
)
FIND_PROGRAM
(
Mercurial_HG_EXECUTABLE hg
FIND_PROGRAM
(
Mercurial_HG_EXECUTABLE hg
DOC
"mercurial command line client"
)
DOC
"mercurial command line client"
)
...
@@ -44,15 +43,14 @@ IF(Mercurial_HG_EXECUTABLE)
...
@@ -44,15 +43,14 @@ IF(Mercurial_HG_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
IF
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
#MESSAGE(WARNING "Command \"${Mercurial_HG_EXECUTABLE} identify ${dir}\" failed with output:\n${Mercurial_hg_identify_error}")
MESSAGE
(
SEND_ERROR
"Command
\"
${
Mercurial_HG_EXECUTABLE
}
identify
${
dir
}
\"
failed with output:
\n
${
Mercurial_hg_identify_error
}
"
)
SET
(
Mercurial_HG_PROJECT FALSE
)
ELSE
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
ELSE
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
STRING
(
REGEX REPLACE
"^(.*
\n
)?Mercurial Distributed SCM [(]version ([.0-9]+).*"
STRING
(
REGEX REPLACE
"^(.*
\n
)?Mercurial Distributed SCM [(]version ([.0-9]+).*"
"
\\
2"
Mercurial_VERSION_HG
"
${
Mercurial_VERSION_HG
}
"
)
"
\\
2"
Mercurial_VERSION_HG
"
${
Mercurial_VERSION_HG
}
"
)
STRING
(
REGEX REPLACE
"^(.*
\n
)?([0-9a-f]+).*"
STRING
(
REGEX REPLACE
"^(.*
\n
)?([0-9a-f]+).*"
"
\\
2"
${
prefix
}
_WC_REVISION
"
${${
prefix
}
_WC_IDENTIFY
}
"
)
"
\\
2"
${
prefix
}
_WC_REVISION
"
${${
prefix
}
_WC_IDENTIFY
}
"
)
SET
(
Mercurial_HG_PROJECT TRUE
)
ENDIF
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
ENDIF
(
NOT
${
Mercurial_hg_identify_result
}
EQUAL 0
)
# restore the previous LC_ALL
# restore the previous LC_ALL
...
...
CMakeLists.txt
View file @
747bd8d6
...
@@ -73,21 +73,19 @@ SET(OTB_VERSION_PATCH "0")
...
@@ -73,21 +73,19 @@ SET(OTB_VERSION_PATCH "0")
FIND_PACKAGE
(
Mercurial
)
FIND_PACKAGE
(
Mercurial
)
IF
(
Mercurial_FOUND
)
IF
(
Mercurial_FOUND
)
Mercurial_WC_IDENTIFY
(
${
PROJECT_SOURCE_DIR
}
OTB
)
Mercurial_WC_IDENTIFY
(
${
PROJECT_SOURCE_DIR
}
OTB
)
IF
(
Mercurial_HG_PROJECT
)
MESSAGE
(
STATUS
"Mercurial version is
${
Mercurial_VERSION_HG
}
"
)
MESSAGE
(
STATUS
"Mercurial version is
${
Mercurial_VERSION_HG
}
"
)
MESSAGE
(
STATUS
"Repository revision is
${
OTB_WC_REVISION
}
"
)
MESSAGE
(
STATUS
"Repository revision is
${
OTB_WC_REVISION
}
"
)
SET
(
OTB_WC_REVISION
${
OTB_WC_REVISION
}
CACHE STRING
"Repository version"
FORCE
)
SET
(
OTB_WC_REVISION
${
OTB_WC_REVISION
}
CACHE STRING
"Repository version"
FORCE
)
MARK_AS_ADVANCED
(
OTB_WC_REVISION
)
MARK_AS_ADVANCED
(
OTB_WC_REVISION
)
IF
(
OTB_WC_STATUS
)
IF
(
OTB_WC_STATUS
)
MESSAGE
(
STATUS
"Local file modifications:"
)
MESSAGE
(
STATUS
"Local file modifications:"
)
MESSAGE
(
STATUS
${
OTB_WC_STATUS
}
)
MESSAGE
(
STATUS
${
OTB_WC_STATUS
}
)
ELSE
(
OTB_WC_STATUS
)
ELSE
(
OTB_WC_STATUS
)
MESSAGE
(
STATUS
"No files modified locally"
)
MESSAGE
(
STATUS
"No files modified locally"
)
ENDIF
(
OTB_WC_STATUS
)
ENDIF
(
OTB_WC_STATUS
)
STRING
(
REGEX REPLACE
"
\n
"
";"
OTB_WC_STATUS
"
${
OTB_WC_STATUS
}
"
)
STRING
(
REGEX REPLACE
"
\n
"
";"
OTB_WC_STATUS
"
${
OTB_WC_STATUS
}
"
)
SET
(
OTB_WC_STATUS
${
OTB_WC_STATUS
}
CACHE STRING
"Repository status"
FORCE
)
SET
(
OTB_WC_STATUS
${
OTB_WC_STATUS
}
CACHE STRING
"Repository status"
FORCE
)
MARK_AS_ADVANCED
(
OTB_WC_STATUS
)
MARK_AS_ADVANCED
(
OTB_WC_STATUS
)
ENDIF
(
Mercurial_HG_PROJECT
)
ENDIF
(
Mercurial_FOUND
)
ENDIF
(
Mercurial_FOUND
)
# Version string should not include patch level. The major.minor is
# Version string should not include patch level. The major.minor is
...
...
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