View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014592CMakeCMakepublic2013-11-22 09:062014-10-06 10:33
ReporterGeorge Sakhnovsky 
Assigned ToStephen Kelly 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSCentOSOS Version6.4
Product VersionCMake 2.8.12 
Target VersionCMake 3.1Fixed in VersionCMake 3.1 
Summary0014592: RunCMake.include_directories (SourceDirectoryInInterface & BinaryDirectoryInInterface) tests fail.
Descriptionafter building cmake 2.8.12.1 on CentOS 6.4, make test fails:

The following tests FAILED:
        256 - RunCMake.include_directories (Failed)

possibly related to the recent addition of target_include_directories()

###

[sakhngeo@repoman cmake-2.8.12.1]$ bin/ctest -VV -R RunCMake.include_directories
UpdateCTestConfiguration from :/usr/local/src/cmake-2.8.12.1/DartConfiguration.tcl
Parse Config file:/usr/local/src/cmake-2.8.12.1/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: XCode
 Add coverage exclude: Kdevelop
 Add coverage exclude: /Source/(cm|kw)sys/
 Add coverage exclude: /CMakeFiles/CMakeTmp/
 Add coverage exclude: [A-Za-z]./[Qq]t/qt-.+-opensource-src
UpdateCTestConfiguration from :/usr/local/src/cmake-2.8.12.1/DartConfiguration.tcl
Parse Config file:/usr/local/src/cmake-2.8.12.1/DartConfiguration.tcl
Test project /usr/local/src/cmake-2.8.12.1
Constructing a list of tests
Guessing configuration NoConfig
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 256
    Start 256: RunCMake.include_directories

256: Test command: /usr/local/src/cmake-2.8.12.1/bin/cmake "-DCMAKE_MODULE_PATH=/usr/local/src/cmake-2.8.12.1/Tests/RunCMake" "-DRunCMake_GENERATOR=Unix Makefiles" "-DRunCMake_GENERATOR_TOOLSET=" "-DRunCMake_SOURCE_DIR=/usr/local/src/cmake-2.8.12.1/Tests/RunCMake/include_directories" "-DRunCMake_BINARY_DIR=/usr/local/src/cmake-2.8.12.1/Tests/RunCMake/include_directories" "-P" "/usr/local/src/cmake-2.8.12.1/Tests/RunCMake/include_directories/RunCMakeTest.cmake"
256: Test timeout computed to be: 1500
256: -- NotFoundContent - PASSED
256: -- DebugIncludes - PASSED
256: -- TID-bad-target - PASSED
256: CMake Error at RunCMake.cmake:74 (message):
256: SourceDirectoryInInterface - FAILED:
256:
256: Result is [0], not [1].
256:
256: stderr does not match that expected.
256:
256: Actual stdout:
256:
256: actual-out> -- The C compiler identification is GNU 4.4.7
256: actual-out> -- The CXX compiler identification is GNU 4.4.7
256: actual-out> -- Check for working C compiler: /usr/bin/cc
256: actual-out> -- Check for working C compiler: /usr/bin/cc -- works
256: actual-out> -- Detecting C compiler ABI info
256: actual-out> -- Detecting C compiler ABI info - done
256: actual-out> -- Check for working CXX compiler: /usr/bin/c++
256: actual-out> -- Check for working CXX compiler: /usr/bin/c++ -- works
256: actual-out> -- Detecting CXX compiler ABI info
256: actual-out> -- Detecting CXX compiler ABI info - done
256: actual-out> -- Configuring done
256: actual-out> -- Generating done
256: actual-out> -- Build files have been written to: /usr/local/src/cmake-2.8.12.1/Tests/RunCMake/include_directories/SourceDirectoryInInterface-build
256:
256: Expected stderr to match:
256:
256: expect-err> CMake Error in CMakeLists.txt:
256: expect-err> Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
256: expect-err>
256: expect-err> ".*RunCMake/include_directories/foo"
256: expect-err>
256: expect-err> which is prefixed in the source directory.
256:
256: Actual stderr:
256:
256: actual-err>
256:
256: Call Stack (most recent call first):
256: include_directories/RunCMakeTest.cmake:6 (run_cmake)
256:
256:
1/1 Test 0000256: RunCMake.include_directories .....***Failed 1.86 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 2.54 sec

The following tests FAILED:
        256 - RunCMake.include_directories (Failed)
Errors while running CTest
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034560)
Stephen Kelly (developer)
2013-11-25 17:09

Do you have any unusual symlinks or anything like that?
(0034578)
George Sakhnovsky (reporter)
2013-11-26 22:21

not that i know of, it's a pretty standard 6.4 install. should i check anything in particular?
(0034580)
Stephen Kelly (developer)
2013-11-27 02:28

No, it was just a shot in the dark. I have no idea what the problem is. Do you see the same problem with cmake master?
(0034605)
George Sakhnovsky (reporter)
2013-11-28 00:19

>> Do you see the same problem with cmake master?

sorry, i don't follow.
(0034733)
Brad King (manager)
2013-12-06 09:21

Re 0014592:0034605: Steve is asking you to test the current development version of CMake in the Git repository 'master' branch:

 http://www.cmake.org/Wiki/CMake/Git [^]

 git clone http://cmake.org/cmake.git [^]
 cd cmake
(0035543)
George Sakhnovsky (reporter)
2014-03-27 16:28

please pardon my tardiness.

i tested both the current development version (master) and the last release version (2.8.12.2), and can confirm that the bug is present in both versions.
(0035565)
Brad King (manager)
2014-03-31 09:10

Re 0014592:0035543: Thanks. The test failure seems to have something to do with not recognizing that the include directory is in the source tree. I wonder if that has something to do with building it in a path starting in "/usr/local". Can you please try this in a user home directory? (This is not a solution but may help identify the problem.)
(0035573)
George Sakhnovsky (reporter)
2014-03-31 10:20

Bingo, can't reproduce the issue when building under /home.
(0035575)
Brad King (manager)
2014-03-31 10:29

The error message being tested is not reached when the source tree is under the install prefix:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmExportFileGenerator.cxx;hb=v3.0.0-rc3#l278 [^]
(0035576)
Brad King (manager)
2014-03-31 10:30

Steve, I think your logic linked in 0014592:0035575 needs to be re-ordered. Building a package in <prefix>/src is common, so this could affect real projects and not just the test case.
(0035579)
Stephen Kelly (developer)
2014-03-31 11:22

I pushed a commit to next excluding the tests in the case reported.

The logic appears to be correct, so I didn't change anything in cmExportFileGenerator.
(0035580)
Brad King (manager)
2014-03-31 11:29

Re 0014592:0035579: If a project is built in <prefix>/src then it might try to export an INTERFACE_INCLUDE_DIRECTORIES in the install tree that refers to <prefix>/src/include. This is incorrect and should be diagnosed by the logic in question, but the "isSubDirectory(li->c_str(), installDir)" test will terminate the check too early because the source tree happens to be under the install prefix.

There is also the case that the install tree is inside the build tree or source tree. This is handled now since the install tree check is first, but the logic needs to account for either possibility.
(0035583)
Stephen Kelly (developer)
2014-03-31 13:13

Ok, I've pushed something better, but I guess this needs a policy...
(0035586)
Brad King (manager)
2014-03-31 14:04

Re 0014592:0035583: Thanks. I don't think this fix needs to be on the release branch because it is not a regression in 3.0 or a bug in a new feature. Certainly we will not be adding a policy in a release candidate.
(0035664)
Brad King (manager)
2014-04-10 10:03

This fix is now in master:

 Export: Disallow exported interface includes in src/build tree
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=783bce29 [^]
(0036965)
Robert Maynard (manager)
2014-10-06 10:33

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-11-22 09:06 George Sakhnovsky New Issue
2013-11-22 09:18 Brad King Assigned To => Stephen Kelly
2013-11-22 09:18 Brad King Status new => assigned
2013-11-25 17:09 Stephen Kelly Note Added: 0034560
2013-11-26 22:21 George Sakhnovsky Note Added: 0034578
2013-11-27 02:28 Stephen Kelly Note Added: 0034580
2013-11-28 00:19 George Sakhnovsky Note Added: 0034605
2013-12-05 19:27 Stephen Kelly Assigned To Stephen Kelly => Brad King
2013-12-06 09:21 Brad King Note Added: 0034733
2014-03-27 16:28 George Sakhnovsky Note Added: 0035543
2014-03-31 09:10 Brad King Note Added: 0035565
2014-03-31 10:20 George Sakhnovsky Note Added: 0035573
2014-03-31 10:29 Brad King Note Added: 0035575
2014-03-31 10:29 Brad King Assigned To Brad King => Stephen Kelly
2014-03-31 10:30 Brad King Note Added: 0035576
2014-03-31 11:22 Stephen Kelly Note Added: 0035579
2014-03-31 11:29 Brad King Note Added: 0035580
2014-03-31 13:13 Stephen Kelly Note Added: 0035583
2014-03-31 14:04 Brad King Note Added: 0035586
2014-04-10 10:03 Brad King Note Added: 0035664
2014-04-10 10:04 Brad King Target Version => CMake 3.1
2014-04-10 11:26 Stephen Kelly Status assigned => resolved
2014-04-10 11:26 Stephen Kelly Fixed in Version => CMake 3.1
2014-04-10 11:26 Stephen Kelly Resolution open => fixed
2014-10-06 10:33 Robert Maynard Note Added: 0036965
2014-10-06 10:33 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team