On Sunday 11 November 2012 22:48:54 Darrell Anderson wrote:
Do not override/pollute CMAKE_REQUIRED_INCLUDES, you can fall into another strange and hard to hunt bugs.
Correct way:
tde_save_and_set( CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIRS} ) check_include_file( fribidi/fribidi-types.h FRIBIDI_NEW_FILENAME ) tde_restore( CMAKE_REQUIRED_INCLUDES )
It's a good practice, but here it is no difference... CMAKE_REQUIRED_INCLUDES remains set only until end of file and there is no other compilations...
Well, is bad idea to think that "in this particular case will working". The particular cases can be changed, new checks can be added, etc.
Serghei,
The patch provided in bug report 1311 resolves the problem on my system. I won't pretend to know how the patch resolves the problem but based upon your concerns expressed in this thread, would you please review the patch? If you approve then I'll push to GIT.
As I said, correct version is:
tde_save_and_set( CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIRS} ) check_include_file( fribidi/fribidi-types.h FRIBIDI_NEW_FILENAME ) tde_restore( CMAKE_REQUIRED_INCLUDES )
Regarding your previous request for the cmake error log, here is the relevant section:
It's ok, is as I was expected.
Determining if the include file fribidi/fribidi-types.h exists failed with the following output: Change Dir: /dev/shm/tdegraphics.build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec891115794/fast"
[...]