[CMake] Can't add /usr/include headers directory when using cmake

2014-01-15 Thread Mike Gorchak
Hi all, I'm using QNX and cmake works fine under it, except for one thing. By default compilation under QNX looks like cross-compilation even if you work using x86 platform and compiling for x86 platform too. By default gcc does not has /usr/include directory as default directory for headers, ins

Re: [CMake] What is the best way to clean up CMakeFiles and CMakeCache.txt if aborting build completely?

2014-01-15 Thread Nicholas Yue
On 16/01/14 7:08 AM, Ben Phillips wrote: Hello list, I came across this problem when I tried to write a CMakeLists.txt that prevents building in the source tree. So I would try something like this: string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _is_in_src) if(_is_in_src) f

[CMake] What is the best way to clean up CMakeFiles and CMakeCache.txt if aborting build completely?

2014-01-15 Thread Ben Phillips
Hello list, I came across this problem when I tried to write a CMakeLists.txt that prevents building in the source tree. So I would try something like this: string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" _is_in_src) if(_is_in_src) file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/CMakeF

Re: [CMake] Searching once

2014-01-15 Thread Matthew Woehlke
On 2014-01-15 11:11, Williams, Norman K wrote: You want the load_cache command: [snip] An *installed* project (what Al mentioned in his original e-mail) probably doesn't have a cache... this would only work if using the build-directory version of the dependency project. The solution I propo

Re: [CMake] Searching once

2014-01-15 Thread Al Niessner
Thank you very much for your help. On Wed, 2014-01-15 at 16:11 +, Williams, Norman K wrote: > You want the load_cache command: > > * load_cache: Load in the values from another project's CMake cache. > load_cache(pathToCacheFile READ_WITH_PREFIX > prefix entry1...) > Read the

[CMake] Policy CMP0020 setting is ignored

2014-01-15 Thread Dominik Bernhardt
Hi although I have "cmake_policy (SET CMP0020 NEW)" in my top level CMakeLists.txt file I get a lot of warnings about "Policy CMP0020 is not set..." After some testing it seems to me that the policy setting is only respected for the configure but not for the generate step. Has anyone an i

Re: [CMake] Searching once

2014-01-15 Thread Williams, Norman K
You want the load_cache command: * load_cache: Load in the values from another project's CMake cache. load_cache(pathToCacheFile READ_WITH_PREFIX prefix entry1...) Read the cache and store the requested entries in variables with their name prefixed with the given prefix. This only r