mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-28 04:09:35 +03:00
Generate `moc_predef.h` using the same C++ standard level that will be used to compile the target so that the compiler's predefined macros can be more accurately recovered. Fixes: #24624 Qt-Issue: https://bugreports.qt.io/browse/QTBUG-110847
26 lines
737 B
CMake
26 lines
737 B
CMake
include(RunCMake)
|
|
|
|
run_cmake(NoQt)
|
|
if (DEFINED with_qt_version)
|
|
set(RunCMake_TEST_OPTIONS
|
|
-Dwith_qt_version=${with_qt_version}
|
|
"-DQt${with_qt_version}_DIR:PATH=${Qt${with_qt_version}_DIR}"
|
|
"-DCMAKE_PREFIX_PATH:STRING=${CMAKE_PREFIX_PATH}"
|
|
)
|
|
|
|
run_cmake(QtInFunction)
|
|
run_cmake(QtInFunctionNested)
|
|
run_cmake(QtInFunctionProperty)
|
|
|
|
run_cmake(CMP0111-imported-target-full)
|
|
run_cmake(CMP0111-imported-target-libname)
|
|
run_cmake(CMP0111-imported-target-implib-only)
|
|
|
|
block()
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MocPredefs-build)
|
|
run_cmake(MocPredefs)
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
run_cmake_command(MocPredefs-build ${CMAKE_COMMAND} --build . --config Debug)
|
|
endblock()
|
|
endif ()
|