In CMake, how does CHECK_INCLUDE_FILE_CXX work?

Posted by Neil G on Stack Overflow See other posts from Stack Overflow or by Neil G
Published on 2010-06-15T08:38:18Z Indexed on 2010/06/15 8:42 UTC
Read the original article Hit count: 241

Filed under:

The following code prints nothing

CHECK_INCLUDE_FILE_CXX(glog/logging.h GLOG_INCLUDE)
IF(GLOG_INCLUDE)
   MESSAGE("YY")
ENDIF(GLOG_INCLUDE)

But I have the following environment variable set:

export CPLUS_INCLUDE_PATH=/usr/local/include

And, "ls /usr/local/include/glog/logging.h" returns the file.

I tried using

include_directories( "/usr/local/include" )

but it doesn't work either.

© Stack Overflow or respective owner

Related posts about cmake