Skip to content

Commit 689279a

Browse files
committed
[NFC] Makefile.defs: Improve omptest search path building
Use `clang -print-resource-dir` instead of manual path building - supported since at least version 18 of clang
1 parent be0edf9 commit 689279a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/Makefile.defs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ else
387387
endif
388388

389389
# ompTest: Set header include path + linker flag for corresponding OMPT tests
390-
CLANG_VERSION := $(lastword $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(AOMP)/lib/clang/*/))))))
391-
OMPTEST = -I$(AOMP)/lib/clang/$(CLANG_VERSION)/include/omptest -lomptest
390+
CLANG_RESOURCE_DIR ?= $(shell $(AOMP)/bin/clang -print-resource-dir)
391+
OMPTEST ?= -I$(CLANG_RESOURCE_DIR)/include/omptest -lomptest
392392

393393
# ompTest: Set and export CMake config path
394394
omptest_DIR = $(AOMP)/lib/cmake/openmp/omptest/

0 commit comments

Comments
 (0)