-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circular dependency in include files #15
Comments
Are you still trying to use MSVC as the compiler, or are you trying to use a different compiler? From my skim of the code in As I said in the readme, currently MSVC is the only compiler that we've tried to use to build this code, though given the announcement of WSL support, we do have aspirations to make it cross-platform, since it serves as the basis of the OpenCLOn12 component, which we plan to leverage in WSL. |
As a random thought this morning it has occured to me it is likely my CMake toolchain file causing the issue, where I enable Edit: indeed, it was |
Yeah, ISO C++ conformance is the first step to making this code cross-platform. The second step is removing Windows-only concepts and embracing |
It seems MSVC is moving away from permissive:
Switching |
I'm trying to compile the library using CMake and Ninja instead of the Visual Studio generators. I was aware that IntelliSense is smarter when used in tandem with MSBuild, as it picks up global information of the build and doesn't operate solely based on translation units. When building with Ninja, after realizing that PCH isn't a build acceleration method but is actually a hard requirement of the build, I added
target_precompiled_header
invocation and realized that the project still doesn't build. I started adding #includes directives to the headers to please the compiler, but ultimately engaged in cyclic include directives. A lot of headers arrive to includingDeviceChild.hpp
which in turn requiresImmediateContext.hpp
which in turn requiresResource.hpp
which then requiresDeviceChild.hpp
again. Removing any of these includes results in undefined types when compiling the very samepch.hpp
the build otherwise relies on.Can anyone comment on how to untie this knot?
The text was updated successfully, but these errors were encountered: