<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/74079>74079</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libomptarget] Regression when `LLVM_LIBRARY_OUTPUT_INTDIR` is not set
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          tuliom
      </td>
    </tr>
</table>

<pre>
    Is [this if-else](https://github.com/llvm/llvm-project/commit/0ec4b82cfddbe0c7c7eb4b3486f55139f56d5f16#diff-898240fd97677719cdcafe8300e5d2cef2c1807aac768de03577f2057ef91630R27-R31) doing the opposite of the intended behavior?
It uses `LLVM_LIBRARY_OUTPUT_INTDIR` when it is not set, leading to the following kind of error:

```
CMake Error at libomptarget/DeviceRTL/CMakeLists.txt:304 (set_target_properties):
 set_target_properties called with incorrect number of arguments.
```

I started seeing this error after #73705 .
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU1-L3C4U_TTmRWYwmsT4kIfZnV9gYPbXMswW-jQYvSZ2TRzU7LTfviSz3VJYKAVRr1499885MkbbTwANKh9Quc_knAYfmjQ768es8_pHc4gYlQ9psBFbswEXAZV7ROshpWtEbIdoi2jb2zTM3Vb5EdHWuddfy-Ya_DdQCdFW-XG0y4aAKrqaKqN1B0RxxaErOlbUlSnLnAlTVro0eYUo09aYTS1qWhCjBa8457lQWkkDNSMESk0VGKrymnApFa9qDYSVnBtKSg5G5BUjJ8o3J5YjKrD2dupxGgD769VHmwB7s9p2SjBp0LiDQb5aHxBrEdkjsjskPEeIGFXkePzydDkeHk6709fLp-fz5-fz5fD_eX84oYrg2wATtgnbiCefcISE6CN2IPUK6lcc453zt-XgxU56QYcQFrTdHe1trsjbWM3HJ_kC-L_FEcuEne38eE0y9AtEu4dXq-B0PiLarp5HG1Pcpu8JsR0jBUa0jpAu9weXa_BXCMlCRFS84-IPPbCSzoHGN5sGbCflQwCV8DSPHYQleBn6eYQpxe2Hgb9VEMckQwKNI8C9ATbe88bSJAgYUcYZJyXeZrphWjAhM2hyTvKCiVJU2dDUXCghlQHCdKU6SbQRUrOuI7SCri4y21BCWU5JnhekYuWWGm24KWrNaVVQoVFBYJTWbRdibn3oMxvjDA0vCBeZkx24uAqB0glueL1ElC66CM1K5m7uIyqIW-v7_kuyya0K-qMv5R6foA8Qo_XTnRt_ZdBv5mRzcM0_S2wNOSLarin9DAAA__9fLjiA">