From d50a4c60040725f27adda8039e9d4783463a1a22 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 23 Dec 2022 20:53:22 +0100 Subject: [PATCH] Consider the `COMPILE_OPTIONS` target property as well in CMake macro --- lib/cmake/modules/ReflectionGenerator.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cmake/modules/ReflectionGenerator.cmake b/lib/cmake/modules/ReflectionGenerator.cmake index 8c142f8..119f2b5 100644 --- a/lib/cmake/modules/ReflectionGenerator.cmake +++ b/lib/cmake/modules/ReflectionGenerator.cmake @@ -142,9 +142,11 @@ function (add_reflection_generator_invocation) foreach (TARGET_NAME ${ARGS_CLANG_OPTIONS_FROM_TARGETS}) # set c++ standard list(APPEND ARGS_CLANG_OPTIONS "-std=c++$") - # add compile flags + # add compile flags and options _reflective_rapidjson_set_prop("${TARGET_NAME}" COMPILE_FLAGS) list(APPEND ARGS_CLANG_OPTIONS "$<$:$>>") + _reflective_rapidjson_set_prop("${TARGET_NAME}" COMPILE_OPTIONS) + list(APPEND ARGS_CLANG_OPTIONS "$<$:$>>") # add compile definitions _reflective_rapidjson_set_prop("${TARGET_NAME}" COMPILE_DEFINITIONS) list(APPEND ARGS_CLANG_OPTIONS "$<$:-D$-D>>")