-
-
Notifications
You must be signed in to change notification settings - Fork 640
Open
Labels
Description
I'm trying to use externalincludes with vs2022, clang and wsl2.
I have a minimal example attached here: externalincludes_wsl2.zip
It contains the following premake5.lua file:
workspace "externalincludes_wsl2"
configurations { "Debug" }
platforms { "linux" }
system "linux"
toolchainversion "wsl2"
toolset "clang"
project "externalincludes_wsl2"
kind "ConsoleApp"
language "C++"
files { "main.cpp" }
externalincludedirs { './external' }I'm generating with the command line premake5.exe vs2022.
The command line Visual Studio is using for the generated project does not include any -isystem as I would expect for clang:
"clang++" -W"switch" -W"no-deprecated-declarations" -W"empty-body" -W"conversion" -W"return-type" -W"parentheses" -W"no-pointer-sign" -W"no-format" -W"uninitialized" -W"unreachable-code" -W"unused-function" -W"unused-value" -W"unused-variable" -std=c++11 -Wall -fno-strict-aliasing -g1 "clang++" -O0 -fthreadsafe-statics -D "NDEBUG" -W"switch" -W"no-deprecated-declarations" -W"empty-body" -W"conversion" -W"return-type" -W"parentheses" -W"no-format" -W"uninitialized" -W"unreachable-code" -W"unused-function" -W"unused-value" -W"unused-variable" -frtti -fomit-frame-pointer -std=c11 -fexceptions "1" -o "C:\Users\redacted\Desktop\externalincludes_wsl2\obj\%(filename).o" Some observations
The generated vcxproj file does have the include set in <ExternalIncludePath>, however that is not reflected in the Visual Studio project property pages where it is for linux + wsl project configurations.
In order to get this to work I can manually set the following settings in the IDE:
