Skip to content

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

@reos-rcrozier

Description

@reos-rcrozier

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions