summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-04 08:30:24 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-06-04 09:36:55 (GMT)
commita984f3257e95f29a72da6566859d4c6a8a5d749b (patch)
treef174238c2d4c5b582fd5f892ea1c64e2b8418c06 /Source/cmMakefile.h
parent00c3840cc8c36adea76c6e833a9e2069645aec8a (diff)
downloadCMake-a984f3257e95f29a72da6566859d4c6a8a5d749b.zip
CMake-a984f3257e95f29a72da6566859d4c6a8a5d749b.tar.gz
CMake-a984f3257e95f29a72da6566859d4c6a8a5d749b.tar.bz2
Introduce add_compile_options command.
This command is similar to add_definitions, in that it affects the compile options of all targets which follow it. The implementation is similar to the implementation of the include_directories command, in that it is based on populating a COMPILE_OPTIONS directory property and using that to initialize the same property on targets. Unlike the include_directories command however, the add_compile_options command does not affect previously defined targets. That is, in the following code, foo will not be compiled with -Wall, but bar will be: add_library(foo ...) add_compile_options(-Wall) add_library(bar ...)
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 74a731d..0a87752 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -206,6 +206,7 @@ public:
*/
void AddDefineFlag(const char* definition);
void RemoveDefineFlag(const char* definition);
+ void AddCompileOption(const char* option);
/** Create a new imported target with the name and type given. */
cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type,
@@ -866,6 +867,10 @@ public:
{
return this->IncludeDirectoriesEntries;
}
+ std::vector<cmValueWithOrigin> GetCompileOptionsEntries() const
+ {
+ return this->CompileOptionsEntries;
+ }
bool IsGeneratingBuildSystem(){ return this->GeneratingBuildSystem; }
void SetGeneratingBuildSystem(){ this->GeneratingBuildSystem = true; }
@@ -919,6 +924,7 @@ protected:
std::string DefineFlags;
std::vector<cmValueWithOrigin> IncludeDirectoriesEntries;
+ std::vector<cmValueWithOrigin> CompileOptionsEntries;
// Track the value of the computed DEFINITIONS property.
void AddDefineFlag(const char*, std::string&);