summaryrefslogtreecommitdiffstats
path: root/config.tests/precompile_header
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/precompile_header')
-rw-r--r--config.tests/precompile_header/CMakeLists.txt8
-rw-r--r--config.tests/precompile_header/header.h8
-rw-r--r--config.tests/precompile_header/main.cpp7
3 files changed, 23 insertions, 0 deletions
diff --git a/config.tests/precompile_header/CMakeLists.txt b/config.tests/precompile_header/CMakeLists.txt
new file mode 100644
index 0000000000..d64887594a
--- /dev/null
+++ b/config.tests/precompile_header/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(precompile_header LANGUAGES CXX)
+
+add_executable(precompile_header main.cpp)
+target_precompile_headers(precompile_header PRIVATE header.h)
diff --git a/config.tests/precompile_header/header.h b/config.tests/precompile_header/header.h
new file mode 100644
index 0000000000..0e35f8cb85
--- /dev/null
+++ b/config.tests/precompile_header/header.h
@@ -0,0 +1,8 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: BSD-3-Clause
+#ifndef HEADER_H
+#define HEADER_H
+
+// Nothing to see here. We just want the HEADER_H define.
+
+#endif
diff --git a/config.tests/precompile_header/main.cpp b/config.tests/precompile_header/main.cpp
new file mode 100644
index 0000000000..3ea84a8dae
--- /dev/null
+++ b/config.tests/precompile_header/main.cpp
@@ -0,0 +1,7 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: BSD-3-Clause
+#ifndef HEADER_H
+# error no go
+#endif
+
+int main() {}