I have this in my CMakeLists.file:
| find_path (
| NSS_INCLUDE_DIR pk11pub.h
| PATH_SUFFIXES include/nss include/nss3
| )
|
| find_path (
| NSPR_INCLUDE_DIR prtypes.h
| PATH_SUFFIXES include/nspr include/nspr4
| )
|
| find_path (
| PQ_INCLUDE_DIR libpq-fe.h
| PATH_SUFFIXES include include/postgresql
| )
|
| include_directories (
| ${PROJECT_SOURCE_DIR}/include
| ${NSS_INCLUDE_DIR}
| ${NSPR_INCLUDE_DIR}
| ${PQ_INCLUDE_DIR}
| ${CMAKE_CURRENT_BINARY_DIR}
| )
|
| CHECK_C_SOURCE_COMPILES ("#include <libpq-fe.h>
| int main() { PGRES_SINGLE_TUPLE; return 0; }
| "
| HAVE_PG_SINGLE_TUPLE
| )
However, I can see that is invoked without the include directories:
/usr/bin/cc -DHAVE_PG_SINGLE_TUPLE -o
CMakeFiles/cmTryCompileExec3118615492.dir/src.c.o -c
/home/fw/src/symboldb/build/CMakeFiles/CMakeTmp/src.c
Is there a way to make CHECK_C_SOURCE_COMPILES honor the discovered
include directories?
--
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