Closed ghidosoft closed 2 years ago
That is definitely odd. warning
is supposed to be a well-supported (if non-standard) directive. I suppose precompiled headers are causing it to fail to recognize the HAVE_CPUID_INTRINSIC
macro, or it's computing the different paths the macros can cause it to take and running into the #warning
it otherwise wouldn't. I don't see why having al.h
and alc.h
in the precompiled headers would cause that, though.
I fear that it was a transient problem caused by CMake cache and Visual Studio: after the n-th restart of Visual Studio and CMake cache reconfiguration now it works correctly, without any further changes to CMakeLists.txt
.
Looking at the code of cpu_caps.cpp
the intellisense reported that no CMake compiler flags were defined, so it was definitely a CMake issue causing the compiler to not recognize that intrin.h
and cpuid where available.
I'm sorry for bothering you with a moot issue, thanks nonetheless for the support.
I'm getting this error when building using MSVC2022 (using openal-soft in a CMake project):
The strange thing is that it happens only if I enable precompiled headers in cmake and add
<AL/al.h>
and<AL/alc.h>
to the PCH with:target_precompile_headers(myaudiolibrary PRIVATE <various-stl-headers...> <AL/al.h> <AL/alc.h>)
.If I simply include those headers in the relevant
.cpp
files it works (and theOpenAL32.dll
library get built regardless of the above problem). Am I missing something obvious?Thanks.