Skip to content

Commit

Permalink
Re-enable all examples (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
neatudarius authored Nov 13, 2024
1 parent 1437ad4 commit 849f0bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "17"
"CMAKE_CXX_STANDARD": "20"
}
},
{
Expand Down
19 changes: 16 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(ALL_EXAMPLES # identity_as_default_projection
identity_direct_usage
)
set(ALL_EXAMPLES identity_direct_usage)

# Example `identity_as_default_projection` need ranges support:
include(CheckCXXSymbolExists)
check_cxx_symbol_exists(__cpp_lib_ranges "ranges" HAS_RANGES)

if(HAS_RANGES)
list(APPEND ALL_EXAMPLES identity_as_default_projection)
else()
message(
WARNING
"Missing range support! Skip: identity_as_default_projection"
)
endif()

message("Examples to be built: ${ALL_EXAMPLES}")

foreach(example ${ALL_EXAMPLES})
add_executable(beman.exemplar.examples.${example})
Expand Down

0 comments on commit 849f0bd

Please sign in to comment.