summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-05-25 20:15:18 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-05-26 13:35:39 +0300
commit07397b6f3c8d81ac05c9db606a05fde35de873ab (patch)
tree9ee4d32fa0c524afe0deb03fc900bdc2505ff3b9 /tests/auto
parent87405869e6b54ea874930dee27d351c57e38c083 (diff)
Fix autotest compilation error on Windows/MinGW
For some reason with MinGW the statemachine code generation failed silently if the provided output directory (where to store the generated .h and .cpp files) did not exist. This commit creates the directory and also adds a warning if nonexistent directory is tried to use. Pick-to: 6.1 Change-Id: I161d7646b4be5bf52fd045d0bf124ab2f8987668 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/scxmlcoutput/path/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/scxmlcoutput/path/CMakeLists.txt b/tests/auto/scxmlcoutput/path/CMakeLists.txt
index ba49f43..cb7f548 100644
--- a/tests/auto/scxmlcoutput/path/CMakeLists.txt
+++ b/tests/auto/scxmlcoutput/path/CMakeLists.txt
@@ -5,8 +5,13 @@ qt_internal_add_test(tst_scxmlcoutput_path
Qt::Scxml
)
-# This testcase tests providing the namespace
+# This testcase tests setting the output path
+set(outputPath "${CMAKE_CURRENT_BINARY_DIR}/thechosenpath")
+# Create the path first relative to the build directory, otherwise the
+# code generation's output might fail on some platforms.
+file(MAKE_DIRECTORY "${outputPath}")
+
qt6_add_statecharts(tst_scxmlcoutput_path
../shared/ids1.scxml
- OUTPUT_DIR thechosenpath
+ OUTPUT_DIR "${outputPath}"
)