jolt physics

On windows I had to do this:

  
    conan install . -c:h "joltphysics/*":tools.cmake.cmaketoolchain:extra_variables='{"FLOATING_POINT_EXCEPTIONS_ENABLED": "OFF"}' --build="joltphysics/*"
  

just testing below

  
    conan install . -c:h "joltphysics/*":tools.cmake.cmaketoolchain:extra_variables='{"PROFILER_IN_DEBUG_AND_RELEASE": "ON"}' --build="joltphysics/*"
  

On linux when I want to get the debug renderer working I do the following, first in my conan default profile I put this:

  
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=14
os=Linux

[conf]
tools.build:cflags=["-msse4.1"]
tools.build:cxxflags=["-msse4.1"]
joltphysics/*:tools.cmake.cmaketoolchain:extra_variables={"DEBUG_RENDERER_IN_DEBUG_AND_RELEASE": "ON", "CPP_RTTI_ENABLED": "ON"}
  

I turn DEBUG_RENDERER_IN_DEBUG_AND_RELEASE` on because I am usually building in release mode and so I since I want the debug renderer in release mode. Now also I usually use RTTI in my code and when I don't have this setting on I get compiler errors: CPP_RTTI_ENABLED. Also I get this error sometimes

  
Version mismatch, make sure you compile the client code with the same Jolt version and compiler definitions!
Mismatching define JPH_DEBUG_RENDERER.
Aborted (core dumped)
  

This happens because the library was built with with

JPH_DEBUG_RENDERER
defined whereas our client code when compiled doesn't have it defined, initially I tried fixing this by just dropping this in main.cpp, #define JPH_DEBUG_RENDERER but that doesn't fix it, instead putting this in my CMakeLists.txt made it work: add_definitions(-DJPH_DEBUG_RENDERER)


edit this page