summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-02-09 20:55:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-02-09 21:02:37 (GMT)
commit23d3d38a312ee09a30d28a7ea80c1540397d08bc (patch)
tree8be7d5384eed05244f1945c7f194f39527469d48 /Source/CMakeLists.txt
parent1cc3e9f2e73b96370257b55f9c96586a898fe9a4 (diff)
downloadCMake-23d3d38a312ee09a30d28a7ea80c1540397d08bc.zip
CMake-23d3d38a312ee09a30d28a7ea80c1540397d08bc.tar.gz
CMake-23d3d38a312ee09a30d28a7ea80c1540397d08bc.tar.bz2
CMakeLists: Generate the cmCommands.cxx file.
Define the list of commands in the CMakeLists.txt file. List the sources in the CMakeLib target, but mark them as HEADER_FILE_ONLY. This has the effect that IDEs will show the files, though they will not be built again. Add a cmCommandsForBootstrap.cxx file for bootstrapping purposes. Rename the cmExportLibraryDependencies file to match the common pattern.
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt46
1 files changed, 45 insertions, 1 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index dbb922d..175a034 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -127,7 +127,7 @@ set(SRCS
cmBootstrapCommands2.cxx
cmCacheManager.cxx
cmCacheManager.h
- cmCommands.cxx
+ "${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx"
cmCommands.h
cmCommandArgumentLexer.cxx
cmCommandArgumentParser.cxx
@@ -298,6 +298,50 @@ set(SRCS
cm_utf8.c
)
+set(COMMAND_INCLUDES "#include \"cmTargetPropCommandBase.cxx\"\n")
+list(APPEND SRCS cmTargetPropCommandBase.cxx)
+set_property(SOURCE cmTargetPropCommandBase.cxx PROPERTY HEADER_FILE_ONLY ON)
+set(NEW_COMMANDS "")
+foreach(command_file
+ cmAddCompileOptionsCommand
+ cmAuxSourceDirectoryCommand
+ cmBuildNameCommand
+ cmCMakeHostSystemInformationCommand
+ cmElseIfCommand
+ cmExportCommand
+ cmExportLibraryDependenciesCommand
+ cmFLTKWrapUICommand
+ cmIncludeExternalMSProjectCommand
+ cmInstallProgramsCommand
+ cmLinkLibrariesCommand
+ cmLoadCacheCommand
+ cmOutputRequiredFilesCommand
+ cmQTWrapCPPCommand
+ cmQTWrapUICommand
+ cmRemoveCommand
+ cmRemoveDefinitionsCommand
+ cmSourceGroupCommand
+ cmSubdirDependsCommand
+ cmTargetCompileDefinitionsCommand
+ cmTargetCompileOptionsCommand
+ cmTargetIncludeDirectoriesCommand
+ cmUseMangledMesaCommand
+ cmUtilitySourceCommand
+ cmVariableRequiresCommand
+ cmVariableWatchCommand
+ cmWriteFileCommand
+ # This one must be last because it includes windows.h and
+ # windows.h #defines GetCurrentDirectory which is a member
+ # of cmMakefile
+ cmLoadCommandCommand
+ )
+ set(COMMAND_INCLUDES "${COMMAND_INCLUDES}#include \"${command_file}.cxx\"\n")
+ set(NEW_COMMANDS "${NEW_COMMANDS}commands.push_back(new ${command_file});\n")
+ list(APPEND SRCS ${command_file}.cxx)
+ set_property(SOURCE ${command_file}.cxx PROPERTY HEADER_FILE_ONLY ON)
+endforeach()
+configure_file(cmCommands.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/cmCommands.cxx @ONLY)
+
# Kdevelop only works on UNIX and not windows
if(UNIX)
set(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx)