View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013870CMake(No Category)public2013-01-23 08:502016-06-10 14:31
ReporterDaniel Pfeifer 
Assigned ToPeter Kuemmel 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformWindowsOSWindowsOS VersionAll
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013870: Ninja: GNUtoMS does not work with Ninja
DescriptionWhen
- building a shared library that exports symbols and
- the platform is Windows and
- Visual Studio is installed and
- the variable CMAKE_GNUtoMS is set and
- the compiler is GNU and
- the generator is Ninja,
no *.lib file is generated.
Steps To ReproduceSee attached project.

This succeeds:
cmake -G"Unix Makefiles" <path to project>

This fails:
cmake -GNinja <path to project>
TagsNo tags attached.
Attached Files7z file icon GNUtoMS.7z [^] (623 bytes) 2013-01-23 08:50
7z file icon Make.7z [^] (24,369 bytes) 2013-01-24 04:37
7z file icon Ninja.7z [^] (22,872 bytes) 2013-01-24 04:37

 Relationships

  Notes
(0032129)
Bill Hoffman (manager)
2013-01-23 11:09

Can you provide the output in VERBOSE mode, also attach the build trees for the ninja and makefile builds.
(0032145)
Daniel Pfeifer (reporter)
2013-01-24 04:42

The attached files Make.7z and Ninja.7z both contain a build tree before running make or ninja respectively.
Note that the file 'CMakeGNUtoMS_lib.bat' is correctly generated in the folder 'CMakeFiles' in both trees.
If you grep for the filename, you will see that it is used in 'Make/CMakeFiles/library.dir/build.make', but it is not used at all in the Ninja build tree!
(0032149)
Bill Hoffman (manager)
2013-01-24 11:17

Ok, looks like it is not implemented. In the makefile we have:
//----------------------------------------------------------------------------
std::string cmMakefileTargetGenerator::GetLinkRule(const char* linkRuleVar)
{
  std::string linkRule = this->Makefile->GetRequiredDefinition(linkRuleVar);
  if(this->Target->HasImplibGNUtoMS())
    {
    std::string ruleVar = "CMAKE_";
    ruleVar += this->Target->GetLinkerLanguage(this->ConfigName);
    ruleVar += "_GNUtoMS_RULE";
    if(const char* rule = this->Makefile->GetDefinition(ruleVar.c_str()))
      {
      linkRule += rule;
      }
    }
  return linkRule;
}

That code needs to be put in the ninja generator.
(0042208)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-01-23 08:50 Daniel Pfeifer New Issue
2013-01-23 08:50 Daniel Pfeifer File Added: GNUtoMS.7z
2013-01-23 11:09 Bill Hoffman Note Added: 0032129
2013-01-24 04:37 Daniel Pfeifer File Added: Make.7z
2013-01-24 04:37 Daniel Pfeifer File Added: Ninja.7z
2013-01-24 04:42 Daniel Pfeifer Note Added: 0032145
2013-01-24 11:17 Bill Hoffman Note Added: 0032149
2013-02-09 06:57 Peter Kuemmel Summary GNUtoMS does not work with Ninja => Ninja: GNUtoMS does not work with Ninja
2013-03-09 06:20 Peter Kuemmel Assigned To => Peter Kuemmel
2013-03-09 06:20 Peter Kuemmel Status new => assigned
2013-03-09 06:20 Peter Kuemmel Status assigned => backlog
2016-06-10 14:28 Kitware Robot Note Added: 0042208
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team