View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015530CMakeCMakepublic2015-04-23 18:052015-11-02 09:13
ReporterBill Torpey 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
Platformx86_64OSLinuxOS VersionRH6
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0015530: is it possible to run the build as a child process of cmake?
DescriptionWhen setting environment variables in a cmake script these obviously don't survive the invocation of cmake itself, and are therefore not available to the subsequent build command (e.g., make).

It would be very helpful if cmake could invoke the build as a sub-process such that any environment variables set in the cmake script would still be available.

I realize that there are (many) other ways to accomplish a similar result. In our case, it would be nice to consolidate the build logic in one place (cmake), rather than to have it spread out in different scripts etc.

I initially thought the --build option to cmake might do this, but it doesn't appear to (or I'm doing something wrong).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038612)
Brad King (manager)
2015-04-27 09:59

The lack of this capability is by design. CMake generates a build system for native tools. Those native tools actually do the build.

In the case of the VS IDE, its build system generally isolates the build from the calling environment anyway.

In the case of command-line builds (e.g. "make") the intention is that CMake is executed from an environment that already contains the settings needed by the toolchain. Building such an environment is outside the scope of CMake.
(0039789)
Robert Maynard (manager)
2015-11-02 09:13

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

 Issue History
Date Modified Username Field Change
2015-04-23 18:05 Bill Torpey New Issue
2015-04-27 09:59 Brad King Note Added: 0038612
2015-04-27 09:59 Brad King Status new => resolved
2015-04-27 09:59 Brad King Resolution open => won't fix
2015-11-02 09:13 Robert Maynard Note Added: 0039789
2015-11-02 09:13 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team