diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-03-31 11:53:36 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-03-31 17:06:00 +0200 |
commit | 403ecb6422b499d9033934148994fe251acc937b (patch) | |
tree | 7312eafd90e874dfd24a20e2d5746eb05b397c14 | |
parent | 4506abd3b16dc9d3cebfdfc3c6661dbcb9731d4b (diff) |
Fix missing 'We mean it' warning for generated qml_compile_hash_p.h
Pick-to: 6.1
Change-Id: I327d377c80749741274a76dfa609417c005bf6c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/QtDeclarativeSetup.cmake | 8 | ||||
-rw-r--r-- | src/qml/qml_compile_hash_p.h.in | 15 |
2 files changed, 16 insertions, 7 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake index d8e4719dbf..cd5ae32e14 100644 --- a/cmake/QtDeclarativeSetup.cmake +++ b/cmake/QtDeclarativeSetup.cmake @@ -15,13 +15,7 @@ function(qt_declarative_write_tag_header target_name) OUTPUT_STRIP_TRAILING_WHITESPACE) endif() string(LENGTH "${QML_COMPILE_HASH}" QML_COMPILE_HASH_LENGTH) - set(compile_hash_contents "// Generated file, DO NOT EDIT - #define QML_COMPILE_HASH \"${QML_COMPILE_HASH}\" - #define QML_COMPILE_HASH_LENGTH ${QML_COMPILE_HASH_LENGTH}" - ) - set(compile_hash_output_path "${CMAKE_CURRENT_BINARY_DIR}/qml_compile_hash_p.h") - file(GENERATE OUTPUT "${compile_hash_output_path}" - CONTENT "${compile_hash_contents}") + configure_file("qml_compile_hash_p.h.in" "${CMAKE_CURRENT_BINARY_DIR}/qml_compile_hash_p.h") endfunction() find_package(PythonInterp REQUIRED) diff --git a/src/qml/qml_compile_hash_p.h.in b/src/qml/qml_compile_hash_p.h.in new file mode 100644 index 0000000000..3316da16d6 --- /dev/null +++ b/src/qml/qml_compile_hash_p.h.in @@ -0,0 +1,15 @@ +// Generated file, DO NOT EDIT + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#define QML_COMPILE_HASH "${QML_COMPILE_HASH}" +#define QML_COMPILE_HASH_LENGTH ${QML_COMPILE_HASH_LENGTH} |