← All tasks
cppjrouwe/JoltPhysics #1004Not a task: already works

Avoid setting CMake configuration types as a subproject

envgap__jrouwe__JoltPhysics-1004

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
e78eb05d3198b64013d225a16ef7076633230b95
Manifest
Build/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

jrouwe/JoltPhysics #1004 · read the original issue
Hi. Trying to include Jolt in my project causes CMake to crash between the configure & generate steps on my macOS machine.



### Steps To Reproduce



```bash

git clone git@github.com:jrouwe/JoltPhysicsHelloWorld.git

cd JoltPhysicsHelloWorld/Build

mkdir build

cmake .. -G "Ninja Multi-Config"

```



### Results



```bash

JoltPhysicsHelloWorld/Build/build on main

❯ cmake .. -G "Ninja Multi-Config"

-- The CXX compiler identification is AppleClang 15.0.0.15000309

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /Applications/Xcode15.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Configuring done (8.4s)

libc++abi: terminating due to uncaught exception of type std::out_of_range: map::at:  key not found

fish: Job 1, 'cmake .. -G "Ninja Multi-Config"' terminated by signal SIGABRT (Abort)

```



I'm on a Apple M2 machine with Sonoma 14.4 and CMake 3.28.3. The crash happens no matter which compiler I try to use (Xcode 13, 14 15 or LLVM-Clang). Looking at the CMakeLists.txt, it appears that this line is responsible for the problem:

https://github.com/jrouwe/JoltPhysics/blob/0191c72d5f6a66217df02c0f6ad5d1c63134b4d4/Build/CMakeLists.txt#L71-L73



Honestly I would suggest to only set this variable when Jolt is built as a toplevel project. When included from another project you probably don't want to mess around with global CXX and linker flags, or change existing CMAKE_CONFIGURATION_TYPES.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]