Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ if (USE_PRECOMPILED_HEADERS)
target_precompile_headers(qgis_server PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/src/core/qgis.h>)
endif()

set_target_properties(qgis_server PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
# fcgi's stdio hacks fail in unity builds on msvc (see https://cdash.orfeo-toolbox.org/viewBuildError.php?buildid=37453)
# Example:
# …\include\__msvc_filebuf.hpp(86): error C2664: 'wint_t fgetwc(FILE *)': cannot convert argument 1 from 'FCGI_FILE *' to 'FILE *'
if(NOT MSVC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n could you add a comment why this is disabled for MSVC (error message or at least a reference to OSGEO4W)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(NOT MSVC)
if(NOT MSVC) # error C2664: 'wint_t ungetwc(wint_t,FILE *)': cannot convert argument 2 from 'FCGI_FILE *' to 'FILE *' https://cdash.orfeo-toolbox.org/viewBuildError.php?buildid=37453

set_target_properties(qgis_server PROPERTIES UNITY_BUILD ${ENABLE_UNITY_BUILDS})
endif(NOT MSVC)

target_include_directories(qgis_server SYSTEM PUBLIC
${CMAKE_SOURCE_DIR}/external/inja
Expand Down