MantisBT - CMake
View Issue Details
0013870CMake(No Category)public2013-01-23 08:502016-06-10 14:31
Daniel Pfeifer 
Peter Kuemmel 
normalminoralways
closedmoved 
WindowsWindowsAll
CMake 2.8.10.2 
 
0013870: Ninja: GNUtoMS does not work with Ninja
When
- 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.
See attached project.

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

This fails:
cmake -GNinja <path to project>
No tags attached.
7z GNUtoMS.7z (623) 2013-01-23 08:50
https://public.kitware.com/Bug/file/4619/GNUtoMS.7z
7z Make.7z (24,369) 2013-01-24 04:37
https://public.kitware.com/Bug/file/4622/Make.7z
7z Ninja.7z (22,872) 2013-01-24 04:37
https://public.kitware.com/Bug/file/4623/Ninja.7z
Issue History
2013-01-23 08:50Daniel PfeiferNew Issue
2013-01-23 08:50Daniel PfeiferFile Added: GNUtoMS.7z
2013-01-23 11:09Bill HoffmanNote Added: 0032129
2013-01-24 04:37Daniel PfeiferFile Added: Make.7z
2013-01-24 04:37Daniel PfeiferFile Added: Ninja.7z
2013-01-24 04:42Daniel PfeiferNote Added: 0032145
2013-01-24 11:17Bill HoffmanNote Added: 0032149
2013-02-09 06:57Peter KuemmelSummaryGNUtoMS does not work with Ninja => Ninja: GNUtoMS does not work with Ninja
2013-03-09 06:20Peter KuemmelAssigned To => Peter Kuemmel
2013-03-09 06:20Peter KuemmelStatusnew => assigned
2013-03-09 06:20Peter KuemmelStatusassigned => backlog
2016-06-10 14:28Kitware RobotNote Added: 0042208
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0032129)
Bill Hoffman   
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   
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   
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   
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.