-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate a CMake-time error if compiler+flags lacks deducing this sup…
…port This improves the user experience when incompatible flags are used. It also is a first step toward resolving #10.
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 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,15 @@ | ||
# Functions that determine compiler capabilities | ||
|
||
include(CheckCXXSourceCompiles) | ||
|
||
# Determines if the selected C++ compiler has deducing this support. Sets | ||
# 'result_var' to whether support is detected. | ||
function(beman_iterator26_check_deducing_this result_var) | ||
check_cxx_source_compiles( " | ||
#ifndef __cpp_explicit_this_parameter | ||
#error No deducing this support | ||
#endif | ||
int main(){} | ||
" HAVE_DEDUCING_THIS ) | ||
set(${result_var} ${HAVE_DEDUCING_THIS} PARENT_SCOPE) | ||
endfunction() |