diff --git a/src/analysis/CMakeLists.txt b/src/analysis/CMakeLists.txt index 427edbbf2ab..a6a24afb4da 100644 --- a/src/analysis/CMakeLists.txt +++ b/src/analysis/CMakeLists.txt @@ -418,7 +418,7 @@ endif() if(NOT MSVC) set_source_files_properties( - ${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp + ${BISON_QgsRasterCalcParser_OUTPUTS} PROPERTIES COMPILE_FLAGS "-w" ) else() @@ -426,7 +426,7 @@ else() # 4127 expression is constant # 4702 unreachable code set_source_files_properties( - ${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp + ${BISON_QgsRasterCalcParser_OUTPUTS} PROPERTIES COMPILE_FLAGS "-wd4127 -wd4702" ) endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6a2f5db2254..0b5f02d6dc4 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -862,9 +862,9 @@ endif() if(NOT MSVC) set_source_files_properties( - qgsexpressionparser.cpp - qgssqlstatementparser.cpp - qgsmeshcalcparser.cpp + ${BISON_QgsExpressionParser_OUTPUTS} + ${BISON_QgsSqlStatementParser_OUTPUTS} + ${BISON_QgsMeshCalcParser_OUTPUTS} PROPERTIES COMPILE_FLAGS -w) else() # -wd4702 unreachable code