[cmake-developers] [CMake 0014591]: find_path appears to ignore PATH_SUFFIXES

Mantis Bug Tracker mantis at public.kitware.com
Fri Nov 22 05:00:58 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14591 
====================================================================== 
Reported By:                holtgrewe
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14591
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-11-22 05:00 EST
Last Modified:              2013-11-22 05:00 EST
====================================================================== 
Summary:                    find_path appears to ignore PATH_SUFFIXES
Description: 
I am using the CMakeLists.txt from below and tried it with different CMake
versions. Note that the include/zlib.h file exists.

The problem occured with 2.12.1 (see below).

Steps to Reproduce: 
See below.

Additional Information: 
C:\Temp\example-build>cmake --version
cmake version 2.8.11.1

C:\Temp\example-build>cmake ..\example -G "Visual Studio 11"
-- The C compiler identification is MSVC 17.0.60610.1
-- The CXX compiler identification is MSVC 17.0.60610.1
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- RESULT C:/seqan-contrib-D20130710-x86/vs11/include
-- RESULT2 C:/seqan-contrib-D20130710-x86/vs11/include
-- RESULT3 C:/seqan-contrib-D20130710-x86/vs11/include
-- EXISTS C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/example-build

C:\Temp\example-build>cmake --version
cmake version 2.8.11.2

C:\Temp\example-build>cmake ..\example -G "Visual Studio 11"
-- The C compiler identification is MSVC 17.0.60610.1
-- The CXX compiler identification is MSVC 17.0.60610.1
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- RESULT C:/seqan-contrib-D20130710-x86/vs11/include
-- RESULT2 C:/seqan-contrib-D20130710-x86/vs11/include
-- RESULT3 C:/seqan-contrib-D20130710-x86/vs11/include
-- EXISTS C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/example-build

C:\Temp\example-build>cmake --version
cmake version 2.8.12.1

C:\Temp\example-build>cmake ..\example -G "Visual Studio 11"
-- The C compiler identification is MSVC 17.0.60610.1
-- The CXX compiler identification is MSVC 17.0.60610.1
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- RESULT RESULT-NOTFOUND
-- RESULT2 RESULT2-NOTFOUND
-- RESULT3 C:/seqan-contrib-D20130710-x86/vs11/include
-- EXISTS C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/example-build

==> CMakeLists.txt <==

cmake_minimum_required (VERSION 2.8)
set (CMAKE_MODULE_PATH "C:/seqan-trunk/util/cmake" ${CMAKE_MODULE_PATH})
set (CMAKE_FIND_ROOT_PATH "C:/seqan-contrib-D20130710-x86/vs11")

find_path (RESULT zlib.h PATH_SUFFIXES include)
message (STATUS "RESULT ${RESULT}")

find_path (RESULT2 zlib.h "C:/seqan-contrib-D20130710-x86/vs11" PATH_SUFFIXES
include)
message (STATUS "RESULT2 ${RESULT2}")

find_path (RESULT3 zlib.h "C:/seqan-contrib-D20130710-x86/vs11/include")
message (STATUS "RESULT3 ${RESULT3}")

if (EXISTS "C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h")
  message (STATUS "EXISTS C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h")
else ()
  message (STATUS "DOES NOT EXIST
C:/seqan-contrib-D20130710-x86/vs11/include/zlib.h")
endif ()
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-11-22 05:00 holtgrewe      New Issue                                    
======================================================================




More information about the cmake-developers mailing list