summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:39:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:39:03 +0000
commit408c608fc7bf1557ee987dd7fbe662fabed21a53 (patch)
tree8b07135336de378134bfedc808d49747174810d3 /examples/CMakeLists.txt
parentInitial commit. (diff)
downloadfrozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.tar.xz
frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.zip
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt16
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()