Giter Club home page Giter Club logo

Comments (9)

mihe avatar mihe commented on May 23, 2024 1

Not that I can see from just testing on Windows at least.

I go through quite a lot of trouble to build all my dependencies as top-level, in large part to avoid issues like this.

from joltphysics.

MrOnlineCoder avatar MrOnlineCoder commented on May 23, 2024

Did I miss something, but you are building the Jolt itself, not including it in the project?

I managed to get it running on Apple M1 machine by using FetchContent module

from joltphysics.

jdumas avatar jdumas commented on May 23, 2024

The issue I'm reporting appears when building Jolt as a subproject. In my example above, I'm using the JoltPhysicsHelloWorld project, which pulls Jolt via FetchContent. When building Jolt itself with the Ninja Multi-Config CMake generator, the project configures fine by itself. I can only assumes that the problem arises when trying to set CMAKE_CONFIGURATION_TYPES from a subproject that is not the root CMakeLists.txt.

from joltphysics.

jrouwe avatar jrouwe commented on May 23, 2024

Hello, I don't own a mac so it's hard for me to investigate this. Also, I don't really feel responsible for crashes in CMake, it is probably best to report the crash here. Perhaps you can narrow down the problem by forking Jolt and the HelloWorld app and pointing the HelloWorld app to your fork before changing CMakeLists.txt until it doesn't crash anymore. At this moment it is only speculation that it is caused by CMAKE_CONFIGURATION_TYPES, and I have had no other complaints about it so far.

from joltphysics.

jdumas avatar jdumas commented on May 23, 2024

If I comment out these lines the crash goes away. I'll report the bug to CMake, but I'm pretty sure it is caused by the non-standard configuration types set by Jolt. Interestingly, I cannot reproduce the error on Windows. Note that the crash only happens when I try to build JoltPhysicsHelloWorld with the Ninja Multi-Config generator, not when building Jolt itself. This indicates an incompatibility between the subproject's config types and the root ones.

In any case I don't think it is a good practice to set non-standard build configuration when building Jolt as a subproject anyway (i.e. when included in a larger codebase via FetchContent), this would create incompatible configuration between the root project and Jolt. Simply checking whether get_directory_property(HAS_PARENT PARENT_DIRECTORY) in Jolt's CMakeLists.txt and not set CMAKE_CONFIGURATION_TYPES would help solve this issue.

from joltphysics.

jdumas avatar jdumas commented on May 23, 2024

Ok found a CMake bug report about this exact issue. While the CMake developers recognize that CMake should error out more gracefully, they also recommend against setting CMAKE_CONFIGURATION_TYPES differently for different directories in a project.

from joltphysics.

jrouwe avatar jrouwe commented on May 23, 2024

Can you try out this PR? (you should be able to have FetchContent target GIT_TAG "7e50ddbcf101ab0ca73da76519e1a8ff8eab786f")

from joltphysics.

jdumas avatar jdumas commented on May 23, 2024

Thanks for the quick fix! I tried this version on the JoltPhysicsHelloWorld project and it seems to work well now.

from joltphysics.

jrouwe avatar jrouwe commented on May 23, 2024

Thanks for testing!

@mihe do you see any issues for godot-jolt with this change?

from joltphysics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.