Skip to content
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

LLVM-Clang on Windows: Cannot specify include directories for target "dMath" #253

Open
jonesmz opened this issue Aug 27, 2021 · 2 comments

Comments

@jonesmz
Copy link
Contributor

jonesmz commented Aug 27, 2021

CMake Error at 3rdparty/newton-dynamics/sdk/dMath/CMakeLists.txt:37 (target_include_directories):
Cannot specify include directories for target "dMath" which is not built by
this project.

This is caused by this github action configuration

name: Windows

on:
  pull_request:
  push:
  release:
    types: published

jobs:
  build:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
      with:
	fetch-depth: 1
        submodules: recursive

    - uses: egor-tensin/setup-clang@v1
      if: ${{ matrix.compiler == 'clang' }}

    - uses: ashutoshvarma/[email protected]
      if: ${{ matrix.compiler == 'clang' }}

    - name: Configure (Clang)
      env:
	CC:  C:\Program Files\LLVM\bin\cc.exe
        CXX: C:\Program Files\LLVM\bin\c++.exe
      run: |
	cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -GNinja

Which is because of this cmake configuration code in sdk/dMath/CMakeLists.txt

if (UNIX OR MINGW)
        if(NEWTON_BUILD_SHARED_LIBS)
           add_library(${projectName} SHARED ${CPP_SOURCE})
        else(NEWTON_BUILD_SHARED_LIBS)
           add_library(${projectName} STATIC ${CPP_SOURCE})
        endif(NEWTON_BUILD_SHARED_LIBS)
endif (UNIX OR MINGW)

I can't think of any reason why if(UNIX OR MINGW) should be here. MSVC supports static and dynamic libraries the same as Unix-like environments.

@jonesmz jonesmz changed the title Cannot specify include directories for target "dMath" which is not built by Cannot specify include directories for target "dMath" Aug 27, 2021
@jonesmz jonesmz changed the title Cannot specify include directories for target "dMath" LLVM-Clang on Windows: Cannot specify include directories for target "dMath" Aug 27, 2021
@JulioJerez
Copy link
Contributor

this is in 3.14
can you fix it and submit a patch or post het the changes?
also can you try 4.00? I think those issues had been addressed but other users on that build system,

@jonesmz
Copy link
Contributor Author

jonesmz commented Sep 13, 2021

also can you try 4.00? I think those issues had been addressed but other users on that build system,

I'm not going to try 4.0 unless there is a tagged release for it, and that tagged release does not contain the 3.14 folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants