summaryrefslogtreecommitdiffstats
path: root/Source/cmCommands.cxx
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/cmCommands.cxx
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/cmCommands.cxx')
-rw-r--r--Source/cmCommands.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index 75f2ae8..3cfbf43 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -11,6 +11,7 @@
============================================================================*/
#include "cmCommands.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
+#include "cmAddCompileOptionsCommand.cxx"
#include "cmAuxSourceDirectoryCommand.cxx"
#include "cmBuildNameCommand.cxx"
#include "cmElseIfCommand.cxx"
@@ -52,6 +53,7 @@ void GetPredefinedCommands(std::list<cmCommand*>&
)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
+ commands.push_back(new cmAddCompileOptionsCommand);
commands.push_back(new cmAuxSourceDirectoryCommand);
commands.push_back(new cmBuildNameCommand);
commands.push_back(new cmElseIfCommand);