[cmake-developers] [CMake 0015358]: try_compile ignores INCLUDE_DIRECTORIES argument
Mantis Bug Tracker
mantis at public.kitware.com
Sun Jan 18 14:09:20 EST 2015
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15358
======================================================================
Reported By: Alexey Chernov
Assigned To:
======================================================================
Project: CMake
Issue ID: 15358
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-01-18 14:09 EST
Last Modified: 2015-01-18 14:09 EST
======================================================================
Summary: try_compile ignores INCLUDE_DIRECTORIES argument
Description:
try_compile command apparently ignores INCLUDE_DIRECTORIES argument for unknown
reason. As documentation
(http://www.cmake.org/cmake/help/v3.1/command/try_compile.html) reads:
"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." But unfortunately parameter of
INCLUDE_DIRECTORIES argument won't be transferred to CMakeLists.txt.
It also be true for other arguments mentioned in that paragraph.
Steps to Reproduce:
1. Write try_compile() command with INCLUDE_DIRECTORIES, e.g.:
try_compile(
COMPILE_RESULT
${CMAKE_BINARY_DIR}
test.cpp
INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/include
OUTPUT_VARIABLE COMPILE_LOG
)
2. Notice that INCLUDE_DIRECTORIES parameter isn't transferred neither to
temporary CMakeLists.txt in CMakeFiles/CMakeTmp (with --debug-trycompile
enabled) nor to compiler command line arguments.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-01-18 14:09 Alexey Chernov New Issue
======================================================================
More information about the cmake-developers
mailing list