Re: [CMake] CHECK_C_SOURCE_COMPILES and include_directories

2015-05-11 Thread Florian Weimer
* Rolf Eike Beer: >> > CMAKE_REQUIRED_INCLUDES = list of include directories >> >> I saw that, but I thought this happens behind the scenes. Do I have >> to set this variable in addition to the include_directories directive? > > Yes, include_directories() only affects target, i.e. add_executabl

Re: [CMake] CHECK_C_SOURCE_COMPILES and include_directories

2015-05-10 Thread Rolf Eike Beer
Florian Weimer wrote: > * Rolf Eike Beer: > > Florian Weimer wrote: > >> Is there a way to make CHECK_C_SOURCE_COMPILES honor the discovered > >> include directories? > >> > > cmake --help-module CheckCSourceCompiles > > > > The following variables may be set before calling this macro to modify

Re: [CMake] CHECK_C_SOURCE_COMPILES and include_directories

2015-05-10 Thread Florian Weimer
* Rolf Eike Beer: > Florian Weimer wrote: > >> Is there a way to make CHECK_C_SOURCE_COMPILES honor the discovered >> include directories? > > cmake --help-module CheckCSourceCompiles > > The following variables may be set before calling this macro to modify > the way the check is run: > […] > C

Re: [CMake] CHECK_C_SOURCE_COMPILES and include_directories

2015-05-10 Thread Rolf Eike Beer
Florian Weimer wrote: > Is there a way to make CHECK_C_SOURCE_COMPILES honor the discovered > include directories? cmake --help-module CheckCSourceCompiles The following variables may be set before calling this macro to modify the way the check is run: […] CMAKE_REQUIRED_INCLUDES = list of inc

[CMake] CHECK_C_SOURCE_COMPILES and include_directories

2015-05-10 Thread Florian Weimer
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 in