Re: [CMake] find_program usage

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 19:38 +0530, vinay kumar Kotegowder wrote: > The original intent of the snippet is to find the required tool chain > (On windows : arm-none-eabi-gcc.exe or armclang.exe; On Linix : > arm-none-eabi-gcc or armclang) path which can later be used to build > the project. > > I hav

Re: [CMake] find_program usage

2019-06-04 Thread vinay kumar Kotegowder
The original intent of the snippet is to find the required tool chain (On windows : arm-none-eabi-gcc.exe or armclang.exe; On Linix : arm-none-eabi-gcc or armclang) path which can later be used to build the project. I have been trying with find_program and find_path commands. My understanding was

Re: [CMake] find_program usage

2019-06-04 Thread Kyle Edwards via CMake
On Tue, 2019-06-04 at 19:07 +0530, vinay kumar Kotegowder wrote: > Hi Everyone, > > This is simple code running on Windows machine: > > if(WIN32) >   message(STATUS "On windows") >   find_program(_TOOL >   arm-none-eabi-gcc.exe >   PATHS "C:" > ) > endif() > >

[CMake] find_program usage

2019-06-04 Thread vinay kumar Kotegowder
Hi Everyone, This is simple code running on Windows machine: if(WIN32) message(STATUS "On windows") find_program(_TOOL arm-none-eabi-gcc.exe PATHS "C:" ) endif() message(STATUS "${_TOOL}") Result after executing: cmake -P mycmake.cmake -- On windows