Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
6.5.0 Beta2
Description
CMake's AUTOMOC generates a moc_predefs.h file that it then passes to moc invocations.
That file is generated by calling the CMAKE_CXX_COMPILER_PREDEFINES_COMMAND
which looks something like:
/usr/bin/c++ -dM -E -c <cmake_install_dir>/Modules/CMakeCXXCompilerABI.cpp
This compiler invocation is missing the c++ standard version flag, which can influence the list of predefined defines.
CMake should be fixed to pass the target's specified c++ std version to the predefines command.
Original implementation of predefine generation was done at https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1328/diffs
Attachments
Issue Links
- relates to
-
QTBUG-93045 The build system should provide a moc_predefs.h with a matching __cplusplus
- Reported
-
QTBUG-73263 Qmake fails to generate moc file when using std::filesystem library
- Open
- mentioned in
-
Page Loading...