Skip to content

Commit a812045

Browse files
committed
Use direct path to the not exe from CMake
1 parent ae4c677 commit a812045

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

flang/unittests/Runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ target_link_libraries(FlangRuntimeTests
3636
FortranRuntime
3737
)
3838

39-
target_compile_definitions(FlangRuntimeTests PRIVATE LLVM_TOOLS_BINARY_DIR="${LLVM_TOOLS_BINARY_DIR}")
39+
target_compile_definitions(FlangRuntimeTests PRIVATE NOT_EXE="$<TARGET_FILE:not>")
4040

4141
add_subdirectory(CUDA)

flang/unittests/Runtime/CommandTest.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "flang/Runtime/execute.h"
1414
#include "flang/Runtime/extensions.h"
1515
#include "flang/Runtime/main.h"
16-
#include "llvm/Support/Path.h"
1716
#include <cstddef>
1817
#include <cstdlib>
1918

@@ -341,10 +340,7 @@ TEST_F(ZeroArguments, ECLValidCommandStatusSetSync) {
341340
}
342341

343342
TEST_F(ZeroArguments, ECLGeneralErrorCommandErrorSync) {
344-
llvm::SmallString<64> cmd;
345-
llvm::sys::path::native(LLVM_TOOLS_BINARY_DIR, cmd);
346-
llvm::sys::path::append(cmd, "not");
347-
OwningPtr<Descriptor> command{CharDescriptor(cmd.data())};
343+
OwningPtr<Descriptor> command{CharDescriptor(NOT_EXE)};
348344
bool wait{true};
349345
OwningPtr<Descriptor> exitStat{IntDescriptor(404)};
350346
OwningPtr<Descriptor> cmdStat{IntDescriptor(202)};

0 commit comments

Comments
 (0)