diff --git a/test/Makefile.defs b/test/Makefile.defs index 1075e2ef5..438685ac4 100644 --- a/test/Makefile.defs +++ b/test/Makefile.defs @@ -387,8 +387,8 @@ else endif # ompTest: Set header include path + linker flag for corresponding OMPT tests -CLANG_VERSION := $(lastword $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(AOMP)/lib/clang/*/)))))) -OMPTEST = -I$(AOMP)/lib/clang/$(CLANG_VERSION)/include/omptest -lomptest +CLANG_RESOURCE_DIR := $(shell $(AOMP)/bin/clang -print-resource-dir) +OMPTEST = -I$(CLANG_RESOURCE_DIR)/include/omptest -lomptest # ompTest: Set and export CMake config path omptest_DIR = $(AOMP)/lib/cmake/openmp/omptest/