View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015915CMakeCMakepublic2016-01-13 11:252016-06-10 14:21
ReporterBryan Koch 
Assigned To 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformAll PlatformsOSOS Version
Product VersionCMake 3.4.1 
Target VersionFixed in Version 
Summary0015915: add_subdirectory(directory EXPORT_VARIABLES VAR_1 VAR_2) gives "add_subdirectory called with incorrect number of arguments"
DescriptionAs per, https://cmake.org/pipermail/cmake/2005-September/007204.html [^]

ADD_SUBDIRECTORY(directory EXPORT VARIABLES VAR_FOO1 VAR_FOO2) should export variables from the child scope into the parent scope.

It was implemented by Ken Martin as per below
https://cmake.org/Bug/bug_relationship_graph.php?bug_id=2221&graph=relation [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0040219)
Brad King (manager)
2016-01-13 11:37

The add_subdirectory command documentation does not specify this signature (and never has):

 https://cmake.org/cmake/help/v3.4/command/add_subdirectory.html [^]

According to 0002221:0003028 the capability was added in the get_directory_property command:

 https://cmake.org/cmake/help/v3.4/command/get_directory_property.html [^]

It is the "DEFINITION" signature.

However, I've never needed to use this in practice. What are you trying to accomplish?
(0040220)
Bryan Koch (reporter)
2016-01-13 11:55
edited on: 2016-01-13 11:56

I'm looking to add several smaller projects git repo's to be built by my project and I was looking for a way to retrieve some of the variables that each smaller projects use so that I can automate building them.

EDIT: Forgot to mention that I need everything in one binary.

(0040221)
Brad King (manager)
2016-01-13 13:19

Re 0015915:0040220: Okay, the get_directory_property approach could work for that if the projects happen to store the information you need in variables to avoid having to make modifications to their sources.
(0041291)
Kitware Robot (administrator)
2016-06-10 14:21

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
2016-01-13 11:25 Bryan Koch New Issue
2016-01-13 11:37 Brad King Note Added: 0040219
2016-01-13 11:55 Bryan Koch Note Added: 0040220
2016-01-13 11:56 Bryan Koch Note Edited: 0040220
2016-01-13 13:19 Brad King Note Added: 0040221
2016-01-13 13:19 Brad King Status new => resolved
2016-01-13 13:19 Brad King Resolution open => no change required
2016-06-10 14:21 Kitware Robot Note Added: 0041291
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team