View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013510CMakeCMakepublic2012-09-03 07:302013-03-04 08:38
Reporterraspy 
Assigned ToPeter Kuemmel 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSRHELOS Version5.4
Product VersionCMake 2.8.9 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0013510: OBJECT_DIR is not expanded for Ninja generator
DescriptionOur compilation rule looks as follows:

<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -fr=<OBJECT_DIR> <SOURCE>

Trying to use Ninja generator fails:

CMake Error at /home/user/cmake-2.8.9-Linux-i386/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/path/to/cgtools/bin/cl6x" is not able
  to compile a simple test program.

  It fails with the following output:

   Change Dir: /path/to/build/CMakeFiles/CMakeTmp



  Run Build Command:/path/to/ninja
  cmTryCompileExec2716513962

  [1/2] Building C object
  CMakeFiles/cmTryCompileExec2716513962.dir/testCCompiler.obj

  FAILED: /path/to/cgtools/bin/cl6x -fr=OBJECT_DIR
  testCCompiler.c

  "/tmp/13712I59qtv", ERROR! at EOF: [E1500] file access error: failed to
  open

                                               "OBJECT_DIR/testCCompiler.obj" for
                                               writing

  "/tmp/13712I59qtv", ERROR! : [E1000] Failed to write object file :

                                        OBJECT_DIR/testCCompiler.obj



  >> Compilation failure

  ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Steps To ReproduceUse:

SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -fr=<OBJECT_DIR> <SOURCE>")

Then run cmake -G Ninja .
Additional InformationIt seems that cmNinjaTargetGenerator::WriteCompileRule (Source/cmNinjaTargetGenerator.cxx:335) does not define ObjectDir in variables as Unix Generator does.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0031165)
Peter Kuemmel (developer)
2012-10-03 11:30

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=188c73cb749ae0b248df05baf9ea6227b54864da [^]
(0031183)
Peter Kuemmel (developer)
2012-10-05 11:34

no problems on cdash
(0032468)
Robert Maynard (manager)
2013-03-04 08:38

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

 Issue History
Date Modified Username Field Change
2012-09-03 07:30 raspy New Issue
2012-10-03 09:00 Peter Kuemmel Assigned To => Peter Kuemmel
2012-10-03 09:00 Peter Kuemmel Status new => assigned
2012-10-03 11:29 Peter Kuemmel Target Version => CMake 2.8.10
2012-10-03 11:30 Peter Kuemmel Note Added: 0031165
2012-10-05 11:34 Peter Kuemmel Note Added: 0031183
2012-10-05 11:34 Peter Kuemmel Status assigned => resolved
2012-10-05 11:34 Peter Kuemmel Fixed in Version => CMake 2.8.10
2012-10-05 11:34 Peter Kuemmel Resolution open => fixed
2013-03-04 08:38 Robert Maynard Note Added: 0032468
2013-03-04 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team