diff options
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r-- | examples/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..2ae5917 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,16 @@ +set(frozen.examples.srcs enum_to_string enum_to_string_hash pixel_art static_assert value_modification) + +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") + list(APPEND frozen.examples.srcs html_entities_map) +endif() + +foreach(src IN LISTS frozen.examples.srcs) + add_executable(frozen.example.${src} ${src}.cpp) + target_link_libraries(frozen.example.${src} PUBLIC frozen::frozen) +endforeach() + +if (TARGET frozen.example.html_entities_map) + target_compile_options(frozen.example.html_entities_map PUBLIC + $<$<CXX_COMPILER_ID:Clang>:-fconstexpr-steps=123456789> + $<$<CXX_COMPILER_ID:AppleClang>:-fconstexpr-steps=123456789>) +endif() |