View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009822 | CMake | CMake | public | 2009-11-02 10:52 | 2014-06-02 08:37 | ||||
Reporter | Mathieu Malaterre | ||||||||
Assigned To | Stephen Kelly | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | CMake 3.0 | |||||||
Summary | 0009822: Please expose: cmGlobalGenerator::GetExportSet at cmake level | ||||||||
Description | It would be very nice if cmGlobalGenerator::GetExportSet was expose at cmake level. This would allow easily exporting a build tree, just as easily as exporting an install tree. typicaly project: add_executable(generator generator.c) add_library(mylib mylib.c) Compare code for install tree: ... install(TARGETS generator DESTINATION lib/myproj/generators EXPORT myproj-targets) install(TARGETS mylib DESTINATION lib/myproj EXPORT myproj-targets) # in a single line to export all target attached to myproj-targets install(EXPORT myproj-targets DESTINATION lib/myproj) ... # myproj-targets.cmake, properly contains all targets attached to myproj-targets while for a build-tree: # need to initialize an empty file: file(WRITE ${COSMO_BINARY_DIR}/CoSMoExports.cmake "") # manually book-keep target that have been attached to myproj-targets if(build_generator) export(TARGETS generator APPEND FILE ${bla}/CoSMoExports.cmake) endif() if(build_mylib) export(TARGETS mylib APPEND FILE ${bla}/CoSMoExports.cmake) endif() # There is no way we are not missing a target listed in myproj-targets Thanks, | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0018315) Brad King (manager) 2009-11-02 12:10 |
Perhaps install(TARGETS generator ... EXPORT myproj-targets) install(TARGETS mylib ... EXPORT myproj-targets) install(EXPORT myproj-targets DESTINATION lib/myproj) # Export targets included in myproj-targets installation: export(EXPORT myproj-targets FILE ${bla}/CoSMoExports.cmake) ? |
(0018316) Mathieu Malaterre (developer) 2009-11-02 12:17 |
That would be truly fantastic. In fact I initially thought this was implemented when I saw 'export(PACKAGE)'... If you get a chance at implementing export(EXPORT), I'd like to volunteer for testing it. Thanks, |
(0018317) Mathieu Malaterre (developer) 2009-11-02 12:34 |
For later reference, here is what I used to catch any missing SHARED lib: if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${COSMO_INSTALL_CMAKE_DIR}/CoSMoTargets.cmake ) file(READ ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${COSMO_INSTALL_CMAKE_DIR}/CoSMoTargets.cmake ENT ) STRING(REGEX REPLACE "\r?\n" ";" ENT "${ENT}") foreach(line ${ENT}) string(REGEX MATCH "ADD_LIBRARY\\(.*SHARED IMPORTED\\)" m ${line}) if( m ) string(REGEX REPLACE "ADD_LIBRARY\\((.*) SHARED IMPORTED\\)" "\\1" out ${m}) list(FIND COSMO_LIBRARIES ${out} out2) if( out2 EQUAL -1) message(FATAL_ERROR "Found the library /${out}/, while the complete list is: ${COSMO_LIBRARIES}") endif() endif() endforeach(line) endif() |
(0030531) Brad King (manager) 2012-08-13 10:37 |
Sending issues I'm not actively working on to the backlog to await someone with time for them. If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^] It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on. |
(0034898) Stephen Kelly (developer) 2014-01-02 15:09 |
Done: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbe7e8fa [^] |
(0036069) Robert Maynard (manager) 2014-06-02 08:37 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-11-02 10:52 | Mathieu Malaterre | New Issue | |
2009-11-02 11:12 | Bill Hoffman | Status | new => assigned |
2009-11-02 11:12 | Bill Hoffman | Assigned To | => Brad King |
2009-11-02 12:10 | Brad King | Note Added: 0018315 | |
2009-11-02 12:17 | Mathieu Malaterre | Note Added: 0018316 | |
2009-11-02 12:34 | Mathieu Malaterre | Note Added: 0018317 | |
2012-08-13 10:37 | Brad King | Status | assigned => backlog |
2012-08-13 10:37 | Brad King | Note Added: 0030531 | |
2013-12-23 11:12 | Stephen Kelly | Assigned To | Brad King => Stephen Kelly |
2013-12-23 11:12 | Stephen Kelly | Status | backlog => assigned |
2014-01-02 15:09 | Stephen Kelly | Note Added: 0034898 | |
2014-01-02 15:09 | Stephen Kelly | Status | assigned => resolved |
2014-01-02 15:09 | Stephen Kelly | Fixed in Version | => CMake 3.0 |
2014-01-02 15:09 | Stephen Kelly | Resolution | open => fixed |
2014-06-02 08:37 | Robert Maynard | Note Added: 0036069 | |
2014-06-02 08:37 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |