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
be0f5869
Commit
be0f5869
authored
Nov 16, 2016
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scripts: print warnings fixes
parent
a5feb98c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
19 deletions
+21
-19
BUILD/capture_warnings.sh
BUILD/capture_warnings.sh
+7
-6
CMakeLists.txt
CMakeLists.txt
+1
-13
cmake/print_warnings.cmake
cmake/print_warnings.cmake
+13
-0
No files found.
BUILD/capture_warnings.sh
100644 → 100755
View file @
be0f5869
...
...
@@ -3,15 +3,16 @@
warn_path
=
$1
shift
warn_file
=
"
$warn_path
/compile.warnings"
suppress_file
=
"
$warn_path
/suppress.warnings"
set
-o
pipefail
exec
3>&1
x
=
$((
"
$@
"
>&
2
)
2
>&
1
1
>&
3
)
error
=
$
{
PIPESTATUS
}
cmderr
=
$(
"
$@
"
2>&1 1>&3
)
error
=
$
?
if
!
[[
-
z
"
$x
"
]]
;
then
echo
-
n
"
$x
"
>>
$warn_file
echo
-
n
"
$x
"
>&
2
if
[[
-n
"
$cmderr
"
]]
;
then
echo
"
$cmderr
"
>
&2
[[
"
$cmderr
"
=
~ warning:
(
.+
)
$
]]
&&
echo
-n
"
$cmderr
"
>>
"
$warn_file
"
fi
exit
${
error
}
CMakeLists.txt
View file @
be0f5869
...
...
@@ -481,16 +481,4 @@ IF(NON_DISTRIBUTABLE_WARNING)
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation."
)
ENDIF
()
IF
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTIES RULE_LAUNCH_COMPILE
"bash
${
CMAKE_SOURCE_DIR
}
/BUILD/capture_warnings.sh
${
CMAKE_BINARY_DIR
}
"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"
${
CMAKE_BINARY_DIR
}
/compile.warnings"
)
ADD_CUSTOM_TARGET
(
REMOVE_WARNINGS_FILE ALL
COMMAND rm -f
"compile.warnings"
WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
ADD_CUSTOM_TARGET
(
REPRINT ALL
COMMAND if [ -f
"compile.warnings"
]; then cat
"compile.warnings"
\; fi
DEPENDS mysql udf_example explain_filename-t REMOVE_WARNINGS_FILE
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
ENDIF
()
INCLUDE
(
${
CMAKE_SOURCE_DIR
}
/cmake/print_warnings.cmake
)
cmake/print_warnings.cmake
0 → 100644
View file @
be0f5869
IF
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
)
SET_DIRECTORY_PROPERTIES
(
PROPERTIES RULE_LAUNCH_COMPILE
"bash
${
CMAKE_SOURCE_DIR
}
/BUILD/capture_warnings.sh
${
CMAKE_BINARY_DIR
}
"
)
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 explain_filename-t rm_compile.warnings
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
ENDIF
()
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