View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015313CMakeCMakepublic2014-12-17 11:262016-05-02 08:30
ReporterEgor P. 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMSVCOSWindowsOS Version8.1
Product VersionCMake 3.0.2 
Target VersionCMake 3.5Fixed in VersionCMake 3.5 
Summary0015313: .def files are not visible in Visual Studio project tree
DescriptionWhen using .def files to set public symbols in libraries it is important to edit .def file (sometimes frequently).
But now they are just consumed by CMake, added to project building (/DEF:...) and not visible in solution.

Is it possible to add .def files to project file tree in Visual Studio?
Steps To Reproducea.cpp:
void a(){}

a.def:
EXPORTS a

CMakeLists.txt
add_library(a SHARED a.cpp a.def)
Tagsdef, msvc
Attached Files

 Relationships

  Notes
(0037475)
Brad King (manager)
2014-12-17 11:35

cmGeneratorTarget::GetModuleDefinitionFile needs to be refactored to return a cmSourceFile* instead of just the path to the source, and its caller(s) updated. Then cmVisualStudio10TargetGenerator::WriteAllSources can use it to call WriteSource("None", defsrc).
(0039833)
Brad King (manager)
2015-11-04 09:16

Relevant mailing list thread:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/14846 [^]
(0039834)
Brad King (manager)
2015-11-04 09:17

These commits fix this:

 Refactor `.def` file lookup
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=247c168b [^]

 VS: Add module definition `.def` files to .vcxproj files
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7e713cc [^]
(0040955)
Robert Maynard (manager)
2016-05-02 08:30

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

 Issue History
Date Modified Username Field Change
2014-12-17 11:26 Egor P. New Issue
2014-12-17 11:27 Egor P. Tag Attached: def
2014-12-17 11:27 Egor P. Tag Attached: msvc
2014-12-17 11:35 Brad King Note Added: 0037475
2015-11-04 09:16 Brad King Note Added: 0039833
2015-11-04 09:17 Brad King Note Added: 0039834
2015-11-04 09:17 Brad King Status new => resolved
2015-11-04 09:17 Brad King Resolution open => fixed
2015-11-04 09:17 Brad King Fixed in Version => CMake 3.5
2015-11-04 09:17 Brad King Target Version => CMake 3.5
2016-05-02 08:30 Robert Maynard Note Added: 0040955
2016-05-02 08:30 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team