Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
53d9e614
Commit
53d9e614
authored
Nov 21, 2016
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scripts: reprint warnings fix
parent
a1c36f2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
BUILD/capture_warnings.sh
BUILD/capture_warnings.sh
+2
-2
cmake/print_warnings.cmake
cmake/print_warnings.cmake
+11
-13
No files found.
BUILD/capture_warnings.sh
View file @
53d9e614
...
...
@@ -11,9 +11,9 @@ cmderr=$("$@" 2>&1 1>&3)
error
=
$?
if
[[
-n
"
$cmderr
"
]]
;
then
[[
"
$warn_mode
"
==
"both
"
]]
&&
[[
"
$warn_mode
"
!=
"late
"
]]
&&
echo
"
$cmderr
"
>
&2
[[
"
$cmderr
"
=
~ warning:
(
.+
)
$
]]
&&
[[
"
$
warn_mode
"
!=
"early"
&&
"
$
cmderr
"
=
~ warning:
(
.+
)
$
]]
&&
echo
-n
"
$cmderr
"
>>
"
$warn_file
"
fi
...
...
cmake/print_warnings.cmake
View file @
53d9e614
...
...
@@ -12,16 +12,14 @@ IF(NOT WARN_MODE STREQUAL "early" AND
MESSAGE
(
FATAL_ERROR
"Unknown WARN_MODE: expected 'early', 'late' or 'both'"
)
ENDIF
()
IF
(
NOT WARN_MODE MATCHES
"early"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTIES RULE_LAUNCH_COMPILE
"bash
${
CMAKE_SOURCE_DIR
}
/BUILD/capture_warnings.sh
${
CMAKE_BINARY_DIR
}
${
WARN_MODE
}
"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"
${
CMAKE_BINARY_DIR
}
/compile.warnings"
)
ADD_CUSTOM_TARGET
(
rm_compile.warnings ALL
COMMAND rm -f compile.warnings
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
ADD_CUSTOM_TARGET
(
print_warnings ALL
COMMAND bash -c '[ -f compile.warnings ] && { echo
"Warnings found:"
\; cat compile.warnings \; echo
""
\; } \; true'
DEPENDS mysql udf_example rm_compile.warnings
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
ENDIF
()
SET_DIRECTORY_PROPERTIES
(
PROPERTIES RULE_LAUNCH_COMPILE
"bash
${
CMAKE_SOURCE_DIR
}
/BUILD/capture_warnings.sh
${
CMAKE_BINARY_DIR
}
${
WARN_MODE
}
"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"
${
CMAKE_BINARY_DIR
}
/compile.warnings"
)
ADD_CUSTOM_TARGET
(
rm_compile.warnings ALL
COMMAND rm -f compile.warnings
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
ADD_CUSTOM_TARGET
(
print_warnings ALL
COMMAND bash -c '[ -f compile.warnings ] && { echo
"Warnings found:"
\; cat compile.warnings \; echo
""
\; } \; true'
DEPENDS mysql udf_example rm_compile.warnings
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
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