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

Running cmake with BUILD_OPENFAST_SIMULINK_API=ON fails with cmake error #1705

Closed
reos-rcrozier opened this issue Jul 26, 2023 · 5 comments
Closed

Comments

@reos-rcrozier
Copy link
Contributor

Bug description
running cmake on dev branch with BUILD_OPENFAST_SIMULINK_API=ON results in the following cmake error:

CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamtypeslib>

  No target "foamtypeslib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamfastlib>

  No target "foamfastlib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamtypeslib>

  No target "foamtypeslib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamfastlib>

  No target "foamfastlib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamtypeslib>

  No target "foamtypeslib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error at /usr/share/cmake-3.22/Modules/FindMatlab.cmake:1123 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_FILE:foamfastlib>

  No target "foamfastlib"
Call Stack (most recent call first):
  glue-codes/simulink/CMakeLists.txt:23 (matlab_add_mex)


CMake Error:
  Error evaluating generator expression:

    $<TARGET_FILE:foamtypeslib>

  No target "foamtypeslib"


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

To Reproduce

Steps to reproduce the behavior:

  1. clone dev branch
  2. run
    cmake -LH ~/src/openfast-official-git -DBUILD_FASTFARM=ON -DBUILD_OPENFAST_CPP_API=ON -DBUILD_OPENFAST_SIMULINK_API=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DDOUBLE_PRECISION=ON -DOPENMP=OFF -DUSE_LOCAL_STATIC_LAPACK=OFF 4. See the error

Expected behavior
cmake to complete without error

OpenFAST Version
recent dev branch commit e6052f2

Additional context
I have a PR with a test with would help prevent such regression in future, see PR #1703

Currently tests are failing because of this issue.

@reos-rcrozier
Copy link
Contributor Author

@deslaughter sorry hope you don't mind me tagging you here as it seems to be your area.

@reos-rcrozier
Copy link
Contributor Author

Seems to be related to the removal of openfoam and addition of addition of the generic externalinflow module. Seems the simulink interface hasn't been modified to take account of this. Hopefully easy to fix.

@reos-rcrozier
Copy link
Contributor Author

This issue would now be resolved by the PR #1703

@andrew-platt
Copy link
Collaborator

Thanks for looking into the Simulink build system! Your expertise in this area is very appreciated!

This was indeed an oversight on my part during the name conversion (it was a bit of a rush due to a deliverable that depended on it).

@reos-rcrozier
Copy link
Contributor Author

It's easily missed, which is why I thought a simulink test would be useful.

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

No branches or pull requests

3 participants