Skip to content

Commit

Permalink
Feedback from linter
Browse files Browse the repository at this point in the history
  • Loading branch information
neatudarius committed Oct 21, 2024
1 parent 8896a10 commit 201c4df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions cmake/CompilerFeatureTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ function(beman_check_range_support result_var)
return()
endif()

check_cxx_source_compiles("
// example specific check due to https://github.com/beman-project/exemplar/issues/41
#include <ranges> // C++20 ranges; note that __cpp_lib_ranges is not defined for all compilers
int main(){ return 0; }
" _HAVE_RANGE_SUPPORT )
check_cxx_source_compiles(
"
#include <ranges> // C++20 ranges; note that __cpp_lib_ranges is not defined for all compilers
int main(){ return 0; }
" _HAVE_RANGE_SUPPORT
)

set(${result_var} ${_HAVE_RANGE_SUPPORT} PARENT_SCOPE)
endfunction()
5 changes: 4 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ set(ALL_EXAMPLES identity_direct_usage)
if(COMPILER_SUPPORTS_RANGES)
list(APPEND ALL_EXAMPLES identity_as_default_projection)
else()
message(WARNING "Missing range support! Skip: identity_as_default_projection")
message(
WARNING
"Missing range support! Skip: identity_as_default_projection"
)
endif()

foreach(example ${ALL_EXAMPLES})
Expand Down

0 comments on commit 201c4df

Please sign in to comment.