aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/data
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-04-15 14:58:14 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-04-17 18:28:40 +0300
commitcf4b9e650226892079759bc8f40241f2cec44d09 (patch)
treefb54ca358b3ba7d7607616b731fb6d34b884df9d /mesonbuild/cmake/data
parentc0a8abc5809e0ecd72d6180a40acbf05cefbc427 (diff)
downloadmeson-cf4b9e650226892079759bc8f40241f2cec44d09.zip
meson-cf4b9e650226892079759bc8f40241f2cec44d09.tar.gz
meson-cf4b9e650226892079759bc8f40241f2cec44d09.tar.bz2
cmake: Do not compile explicit header files
Diffstat (limited to 'mesonbuild/cmake/data')
-rw-r--r--mesonbuild/cmake/data/preload.cmake34
1 files changed, 33 insertions, 1 deletions
diff --git a/mesonbuild/cmake/data/preload.cmake b/mesonbuild/cmake/data/preload.cmake
index 30178fb..f8caae9 100644
--- a/mesonbuild/cmake/data/preload.cmake
+++ b/mesonbuild/cmake/data/preload.cmake
@@ -31,5 +31,37 @@ macro(add_custom_target)
_add_custom_target(${ARGV})
endmacro()
-set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target)
+macro(set_property)
+ meson_ps_inspect_vars()
+ _set_property(${ARGV})
+endmacro()
+
+function(set_source_files_properties)
+ set(FILES)
+ set(I 0)
+ set(PROPERTIES OFF)
+
+ while(I LESS ARGC)
+ if(NOT PROPERTIES)
+ if("${ARGV${I}}" STREQUAL "PROPERTIES")
+ set(PROPERTIES ON)
+ else()
+ list(APPEND FILES "${ARGV${I}}")
+ endif()
+
+ math(EXPR I "${I} + 1")
+ else()
+ set(ID_IDX ${I})
+ math(EXPR PROP_IDX "${ID_IDX} + 1")
+
+ set(ID "${ARGV${ID_IDX}}")
+ set(PROP "${ARGV${PROP_IDX}}")
+
+ set_property(SOURCE ${FILES} PROPERTY "${ID}" "${PROP}")
+ math(EXPR I "${I} + 2")
+ endif()
+ endwhile()
+endfunction()
+
+set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property)
meson_ps_reload_vars()