View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011725CMakeCMakepublic2011-01-19 17:032011-01-31 16:09
ReporterDaniel Richard G. 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011725: CMAKE_USER_MAKE_RULES_OVERRIDE path no longer works if unqualified
DescriptionAt the top of my top-level CMakeLists.txt file, I have

    SET(CMAKE_USER_MAKE_RULES_OVERRIDE CMakeCommon.txt)

My CMakeCommon.txt file lives right alongside the aforementioned listfile, and things worked dandily like this for the last few years (up to 2.8.1).

With 2.8.3, however, I get this:

********(cut here)********
-- The C compiler identification is Intel
-- Using predefined Intel compiler flags
-- Check for working C compiler: C:/Program Files (x86)/Intel/Compiler/C++/9.1/EM64T/Bin/icl.exe
CMake Error at X:/freeport/arch/win64_icl_mt/share/cmake-2.8/Modules/CMakeCInformation.cmake:79 (INCLUDE):
  include could not find load file:

    CMakeCommon.txt
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)
********(cut here)********

Things work again if I edit the line to

    SET(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_SOURCE_DIR}/CMakeCommon.txt)

However, I believe the previous behavior was reasonable, where this variable would implicitly be interpreted relative to ${CMAKE_SOURCE_DIR} rather than anywhere else.
TagsNo tags attached.
Attached Files

 Relationships
related to 0010902closedBrad King USER_MAKE_RULES_OVERRIDE variable is not used in initial try_compile 
related to 0011724closedBrad King CMAKE_RUNTIME_OUTPUT_DIRECTORY breaks try_compile()'s COPY_FILE directive in 2.8.3 
related to 0011942closedDavid Cole INCLUDE inside file defined by CMAKE_USER_MAKE_RULES_OVERRIDE broken since 2.8.3 

  Notes
(0024937)
Bill Hoffman (manager)
2011-01-19 17:37

What do you get with 2.8.4 RC?
(0024940)
Brad King (manager)
2011-01-19 17:41

Out of curiosity, what do you set in your CMakeCommon.txt?
(0024942)
Brad King (manager)
2011-01-19 17:51

Both this and issue 0011724 were introduced by this commit:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=295b5b60 [^]

which was created in response to issue 0010902.
(0024943)
Brad King (manager)
2011-01-19 17:52

The issue still exists in 2.8.4-rc1.
(0024947)
Daniel Richard G. (reporter)
2011-01-19 18:39
edited on: 2011-01-19 18:44

CMakeCommon.txt is used primarily to set CMAKE_C_FLAGS_INIT and friends, although a number of other general CMake configuration variables are set in there as well (like CMAKE_RUNTIME_OUTPUT_DIRECTORY, CMAKE_INCLUDE_CURRENT_DIR, etc.).

Looking at the commit, what would seem to be needed is (1) to qualify relative paths in the OVERRIDE variable w.r.t. ${CMAKE_SOURCE_DIR}, making explicit what had been implicit before, and (2) to make COPY_FILE aware of CMAKE_RUNTIME_OUTPUT_DIRECTORY, to address issue 11724.

(0024950)
Brad King (manager)
2011-01-20 07:51

I've committed a change that converts CMAKE_USER_MAKE_RULES_OVERRIDE and friends to a full path as soon as they are used (and before any try_compile-s occur):

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a146e034 [^]

That way the full paths will be passed down to try_compile projects.

 Issue History
Date Modified Username Field Change
2011-01-19 17:03 Daniel Richard G. New Issue
2011-01-19 17:37 Bill Hoffman Note Added: 0024937
2011-01-19 17:41 Brad King Assigned To => Brad King
2011-01-19 17:41 Brad King Status new => assigned
2011-01-19 17:41 Brad King Note Added: 0024940
2011-01-19 17:47 Brad King Relationship added related to 0010902
2011-01-19 17:48 Brad King Relationship added related to 0011724
2011-01-19 17:51 Brad King Note Added: 0024942
2011-01-19 17:52 Brad King Note Added: 0024943
2011-01-19 18:39 Daniel Richard G. Note Added: 0024947
2011-01-19 18:44 Daniel Richard G. Note Edited: 0024947
2011-01-20 07:49 Brad King Target Version => CMake 2.8.4
2011-01-20 07:51 Brad King Note Added: 0024950
2011-01-20 07:51 Brad King Status assigned => closed
2011-01-20 07:51 Brad King Resolution open => fixed
2011-01-31 16:09 David Cole Fixed in Version => CMake 2.8.4
2011-03-31 12:35 Brad King Relationship added related to 0011942


Copyright © 2000 - 2018 MantisBT Team