Building on Windows10: Error + Fix when including boost library
Building Nektar++ on Windows 10 with Visual Studio 2019, Boost 1.72.0 + setting BOOST_HOME, cmake 3.25.1 failed with the error "c1xx : fatal error C1083: Cannot open source file: 'C:/local/boost_1_72_0': No such file or directory".
More important was the previous warning "cl : command line warning D9002: ignoring unknown option '-isystem'". I think the problem here is that the msvc compiler cannot interpret the option '-isystem' which is used by gcc, but, instead, requires the equivalent option '/I'. I attach the full cmake-log and build-log for reference. cmakelog buildlog
I fixed this via the conditional statement for WIN32 in CMakeLists.txt. Changing the include option from '-isystem ' to '/I ':
SET(Boost_USE_STATIC_LIBS OFF)
IF(WIN32)
[...]
SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "/I ")
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "/I ")
ENDIF()