No subject


Mon Aug 10 18:29:21 EDT 2009


"In this version all files in bindir/CMakeFiles/CMakeTmp, will be
cleaned automatically, for debugging a --debug-trycompile can be
passed to cmake to avoid the clean. Some extra flags that can be
included are, INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and
LINK_LIBRARIES. COMPILE_DEFINITIONS are -Ddefinition that will be
passed to the compile line. try_compile creates a CMakeList.txt file
on the fly that looks like this:

  add_definitions( <expanded COMPILE_DEFINITIONS from calling cmake>)
  include_directories(${INCLUDE_DIRECTORIES})
  link_directories(${LINK_DIRECTORIES})
  add_executable(cmTryCompileExec sources)
  target_link_libraries(cmTryCompileExec ${LINK_LIBRARIES})"

It's unclear to me if I can specify INCLUDE_DIRECTORIES and such in
the parameter list to try_compile, or if they're special variables I
can set that will affect try_compile. From my own testing *neither*
seems to be true, so I have no idea what the docs are trying to say,
but maybe I'm doing something else wrong. Can anyone clarify?


More information about the CMake mailing list