Hi, Attached is a minimal example. To use it: 1. Build phase. Under find_program.BUG/build, use CMakeLists.txt to prepare runtime part 2. Test phase. Under find_program.BUG/runtime, use CMakeLists.txt to show the bug.
Here is the result on my SuSE Linux with CMake 3.3.1 (binaries retrieved from CMake web site): -- The C compiler identification is GNU 4.3.4 -- The CXX compiler identification is GNU 4.3.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done Test1: Fail to found correct exe: /home/marc/tests/find_program.BUG/runtime/dir2/exe Test2: Found correct exe: /home/marc/tests/find_program.BUG/runtime/dir1/exe -- Configuring done -- Generating done -- Build files have been written to: /home/marc/tests/find_program.BUG/runtime/gen Marc On 02/09/15 17:44, "Brad King" <brad.k...@kitware.com> wrote: >On 09/02/2015 09:09 AM, CHEVRIER, Marc wrote: >> On 02/09/15 14:58, "Brad King" wrote: >>> On 09/02/2015 05:31 AM, CHEVRIER, Marc wrote: >>>> find_program (MY_EXE my_exe HINTS PATH1 PATH2 PATH3) >>> >>> find_program (MY_EXE >>> NAMES my_exe >>> HINTS PATH1 PATH2 PATH3 >>> ) >> Same problem. HINTS which are also defined in the environment >> variable PATH are ignored. > >I'm having trouble reproducing this. Please provide a tarball >with a full CMakeLists.txt and supporting files that demonstrate >this. You can "set(ENV{PATH} ...)" if needed. > >Thanks, >-Brad
find_program.BUG.tar.gz
Description: find_program.BUG.tar.gz
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers