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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to