Neumann-A / my-vcpkg-triplets

my collection of vcpkg triplets
MIT License
70 stars 12 forks source link

find_program fails in extra_setup.cmake #3

Closed eladmaimoni closed 1 year ago

eladmaimoni commented 1 year ago

Hi, thank you for the great triplets.

I installed clang compiler via Visual Studio 2022 installer. With the VS2022 developer command prompt, I configure my cmake / vcpkg with the x64-win-llvm-static-md set as triplet.

It seems the extra arguments in the following find_program cause it to fail.

# this fails to find clang
#find_program(CLANG-CL_EXECUTBALE NAMES "clang-cl" "clang-cl.exe" PATHS "${POSSIBLE_LLVM_BIN_DIR}"
#                                                                       ENV LLVMInstallDir
#                                                                 PATH_SUFFIXES "bin"
#                                                                 NO_DEFAULT_PATH)

# this on the other hand succeeds:                                                      
find_program(CLANG-CL_EXECUTBALE NAMES "clang-cl" "clang-cl.exe")

any idea why? can this be fixed more cleanly?

Neumann-A commented 1 year ago

any idea why?

NO_DEFAULT_PATH removes PATH from lookup.

Hmm I could simply implement two find_program calls right after each other.

Neumann-A commented 1 year ago

should be fixed now.