-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6558 from DimitryAndric/fix-qsort-variants-2
Work around -Werror problems when detecting qsort variants
- Loading branch information
Showing
5 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include(CheckPrototypeDefinition) | ||
|
||
function(check_prototype_definition_safe function prototype return header variable) | ||
# temporarily save CMAKE_C_FLAGS and disable warnings about unused | ||
# unused functions and parameters, otherwise they will always fail | ||
# if ENABLE_WERROR is on | ||
set(SAVED_CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") | ||
|
||
disable_warnings(unused-function) | ||
disable_warnings(unused-parameter) | ||
|
||
check_prototype_definition("${function}" "${prototype}" "${return}" "${header}" "${variable}") | ||
|
||
# restore CMAKE_C_FLAGS | ||
set(CMAKE_C_FLAGS "${SAVED_CMAKE_C_FLAGS}") | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters