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
d7ef775a
Commit
d7ef775a
authored
Oct 28, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scripts: WARN_MODE off by default
parent
b76787b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
31 deletions
+25
-31
cmake/print_warnings.cmake
cmake/print_warnings.cmake
+25
-31
No files found.
cmake/print_warnings.cmake
View file @
d7ef775a
IF
(
NOT
DEFINED WARN_MODE
)
IF
(
CMAKE_BUILD_TYPE MATCHES
"Debug"
)
SET
(
WARN_MODE
"late"
)
ELSE
(
)
SET
(
WARN_MODE
"early
"
)
IF
(
DEFINED WARN_MODE
)
IF
(
NOT WARN_MODE STREQUAL
"early"
AND
NOT WARN_MODE STREQUAL
"late"
AND
NOT WARN_MODE STREQUAL
"both"
)
MESSAGE
(
FATAL_ERROR
"Unknown WARN_MODE: expected 'early', 'late' or 'both'
"
)
ENDIF
()
ENDIF
()
IF
(
NOT WARN_MODE STREQUAL
"early"
AND
NOT WARN_MODE STREQUAL
"late"
AND
NOT WARN_MODE STREQUAL
"both"
)
MESSAGE
(
FATAL_ERROR
"Unknown WARN_MODE: expected 'early', 'late' or 'both'"
)
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 mysqld rm_compile.warnings
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
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 mysqld rm_compile.warnings
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
"
)
IF
(
TARGET explain_filename-t
)
ADD_DEPENDENCIES
(
print_warnings explain_filename-t
)
ENDIF
()
IF
(
TARGET explain_filename-t
)
ADD_DEPENDENCIES
(
print_warnings explain_filename-t
)
ENDIF
()
IF
(
TARGET mysql_client_test
)
ADD_DEPENDENCIES
(
print_warnings mysql_client_test
)
ENDIF
()
IF
(
TARGET mysql_client_test
)
ADD_DEPENDENCIES
(
print_warnings mysql_client_test
)
ENDIF
()
IF
(
TARGET udf_example
)
ADD_DEPENDENCIES
(
print_warnings udf_example
)
IF
(
TARGET udf_example
)
ADD_DEPENDENCIES
(
print_warnings udf_example
)
ENDIF
()
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