diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Source/CPack/cmCPackDocumentVariables.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmParseGTMCoverage.cxx | 4 | ||||
-rw-r--r-- | Source/CursesDialog/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/cmConfigure.cmake.h.in | 2 | ||||
-rw-r--r-- | Source/cmDocumentVariables.cxx | 106 | ||||
-rw-r--r-- | Source/cmExportTryCompileFileGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 5 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 6 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio12Generator.h | 5 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 35 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 15 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 32 |
14 files changed, 145 insertions, 88 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 64fc53f..8412e3e 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -394,7 +394,7 @@ if(WIN32 AND NOT CYGWIN AND NOT BORLAND) set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) add_executable(cmcldeps cmcldeps.cxx) target_link_libraries(cmcldeps CMakeLib) - install_targets(/bin cmcldeps) + install(TARGETS cmcldeps DESTINATION bin) endif() # create a library used by the command line and the GUI @@ -554,7 +554,7 @@ if(WIN32) if(NOT UNIX) add_executable(cmw9xcom cmw9xcom.cxx) target_link_libraries(cmw9xcom CMakeLib) - install_targets(/bin cmw9xcom) + install(TARGETS cmw9xcom DESTINATION bin) endif() endif() @@ -580,11 +580,9 @@ endif() include (${CMake_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) -install_targets(/bin cmake) -install_targets(/bin ctest) -install_targets(/bin cpack) +install(TARGETS cmake ctest cpack DESTINATION bin) if(APPLE) - install_targets(/bin cmakexbuild) + install(TARGETS cmakexbuild DESTINATION bin) endif() -install_files(${CMAKE_DATA_DIR}/include cmCPluginAPI.h) +install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include) diff --git a/Source/CPack/cmCPackDocumentVariables.cxx b/Source/CPack/cmCPackDocumentVariables.cxx index 1dfaaf9..8b16ae9 100644 --- a/Source/CPack/cmCPackDocumentVariables.cxx +++ b/Source/CPack/cmCPackDocumentVariables.cxx @@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm) " the so-called top level directory. The purpose of" " is to include (set to 1 or ON or TRUE) the top level directory" " in the package or not (set to 0 or OFF or FALSE).\n" - "Each CPack generator as a built-in default value for this" + "Each CPack generator has a built-in default value for this" " variable. E.g. Archive generators (ZIP, TGZ, ...) includes" " the top level whereas RPM or DEB don't. The user may override" " the default value by setting this variable.\n" diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 5dfcfe5..6b4adb4 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -98,7 +98,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) bool found = this->FindMumpsFile(routine, filepath); if(found) { - int lineoffset; + int lineoffset = 0; if(this->FindFunctionInMumpsFile(filepath, function, lineoffset)) @@ -106,8 +106,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) cmCTestCoverageHandlerContainer::SingleFileCoverageVector& coverageVector = this->Coverage.TotalCoverage[filepath]; coverageVector[lineoffset + linenumber] += count; + lastoffset = lineoffset; } - lastoffset = lineoffset; } else { diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt index 96e28b4..5efc2fb 100644 --- a/Source/CursesDialog/CMakeLists.txt +++ b/Source/CursesDialog/CMakeLists.txt @@ -34,4 +34,4 @@ add_executable(ccmake ${CURSES_SRCS} ) target_link_libraries(ccmake CMakeLib) target_link_libraries(ccmake cmForm) -install_targets(/bin ccmake) +install(TARGETS ccmake DESTINATION bin) diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 114afd7..ab53b1d 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -19,4 +19,4 @@ #cmakedefine CMAKE_STRICT #define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}" #define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}" -#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@" +#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@" diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 2c2d377..c4f6216 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -19,7 +19,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "The full path to the cmake executable.", "This is the full path to the CMake executable cmake which is " "useful from custom commands that want to use the cmake -E " - "option for portable system commands. " + "option for portable system commands. " "(e.g. /usr/local/bin/cmake", false, "Variables that Provide Information"); cm->DefineProperty @@ -27,14 +27,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "The path to the top level of the build tree.", "This is the full path to the top level of the current CMake " "build tree. For an in-source build, this would be the same " - "as CMAKE_SOURCE_DIR. ", false, + "as CMAKE_SOURCE_DIR.", false, "Variables that Provide Information"); cm->DefineProperty ("CMAKE_SOURCE_DIR", cmProperty::VARIABLE, "The path to the top level of the source tree.", "This is the full path to the top level of the current CMake " "source tree. For an in-source build, this would be the same " - "as CMAKE_BINARY_DIR. ", false, + "as CMAKE_BINARY_DIR.", false, "Variables that Provide Information"); cm->DefineProperty ("CMAKE_CURRENT_BINARY_DIR", cmProperty::VARIABLE, @@ -42,7 +42,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "This the full path to the build directory that is currently " "being processed by cmake. Each directory added by " "add_subdirectory will create a binary directory in the build " - "tree, and as it is being processed this variable will be set. " + "tree, and as it is being processed this variable will be set. " "For in-source builds this is the current source directory " "being processed.", false, "Variables that Provide Information"); @@ -100,7 +100,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_SCRIPT_MODE_FILE", cmProperty::VARIABLE, - "Full path to the -P script file currently being processed. ", + "Full path to the -P script file currently being processed.", "When run in -P script mode, CMake sets this variable to the full " "path of the script file. When run to configure a CMakeLists.txt " "file, this variable is not set.", false, @@ -108,14 +108,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_ARGC", cmProperty::VARIABLE, - "Number of command line arguments passed to CMake in script mode. ", + "Number of command line arguments passed to CMake in script mode.", "When run in -P script mode, CMake sets this variable to the number " - "of command line arguments. See also CMAKE_ARGV0, 1, 2 ... ", false, + "of command line arguments. See also CMAKE_ARGV0, 1, 2 ...", false, "Variables that Provide Information"); cm->DefineProperty ("CMAKE_ARGV0", cmProperty::VARIABLE, - "Command line argument passed to CMake in script mode. ", + "Command line argument passed to CMake in script mode.", "When run in -P script mode, CMake sets this variable to " "the first command line argument. It then also sets CMAKE_ARGV1, " "CMAKE_ARGV2, ... and so on, up to the number of command line arguments " @@ -133,7 +133,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "and for Visual Studio 7 it set to devenv. For " "NMake Makefiles the value is nmake. This can be " "useful for adding special flags and commands based" - " on the final build environment. ", false, + " on the final build environment.", false, "Variables that Provide Information"); cm->DefineProperty ("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE, @@ -393,7 +393,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_SOURCE_DIR", cmProperty::VARIABLE, "Source directory for project.", - "This is the top level source directory for the project. " + "This is the top level source directory for the project. " "It corresponds to the source directory given to " "cmake-gui or ccmake.",false, "Variables that Provide Information"); @@ -419,7 +419,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("PROJECT_NAME", cmProperty::VARIABLE, "Name of the project given to the project command.", "This is the name given to the most " - "recent PROJECT command. ",false, + "recent PROJECT command.",false, "Variables that Provide Information"); cm->DefineProperty ("PROJECT_SOURCE_DIR", cmProperty::VARIABLE, @@ -550,7 +550,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "By default, automoc behaves exactly as described in the documentation " "of the AUTOMOC target property. " "When set to TRUE, it accepts more input and tries to find the correct " - "input file for moc even if it differs from the documented behaviour. " + "input file for moc even if it differs from the documented behaviour. " "In this mode it e.g. also checks whether a header file is intended to " "be processed by moc when a \"foo.moc\" file has been included.\n" "Relaxed mode has to be enabled for KDE4 compatibility.", @@ -563,7 +563,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "If an install() command is used without the COMPONENT argument, " "these files will be grouped into a default component. The name of this " "default install component will be taken from this variable. " - "It defaults to \"Unspecified\". ", + "It defaults to \"Unspecified\".", false, "Variables That Change Behavior"); @@ -591,9 +591,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_CONFIGURATION_TYPES", cmProperty::VARIABLE, "Specifies the available build types on multi-config generators.", "This specifies what build types (configurations) will be available " - "such as Debug, Release, RelWithDebInfo etc. " + "such as Debug, Release, RelWithDebInfo etc. " "This has reasonable defaults on most platforms, " - "but can be extended to provide other build types. " + "but can be extended to provide other build types. " "See also CMAKE_BUILD_TYPE for details of managing configuration data, " "and CMAKE_CFG_INTDIR." ,false, @@ -604,20 +604,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Specifies the build type on single-configuration generators.", "This statically specifies what build type (configuration) " "will be built in this build tree. Possible values are " - "empty, Debug, Release, RelWithDebInfo and MinSizeRel. " + "empty, Debug, Release, RelWithDebInfo and MinSizeRel. " "This variable is only meaningful to single-configuration generators " "(such as make and Ninja) i.e. " "those which choose a single configuration " "when CMake runs to generate a build tree as opposed to " "multi-configuration generators which offer selection of the build " - "configuration within the generated build environment. " + "configuration within the generated build environment. " "There are many per-config properties and variables " "(usually following clean SOME_VAR_<CONFIG> order conventions), " "such as CMAKE_C_FLAGS_<CONFIG>, specified as uppercase: " - "CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]. " + "CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]. " "For example, in a build tree configured " "to build type Debug, CMake will see to having " - "CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS settings. " + "CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS settings. " "See also CMAKE_CONFIGURATION_TYPES." ,false, "Variables That Change Behavior"); @@ -643,10 +643,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "directories. This variable defaults to /usr/local" " on UNIX and c:/Program Files on Windows.\n" "On UNIX one can use the DESTDIR mechanism in order" - " to relocate the whole installation. " + " to relocate the whole installation. " "DESTDIR means DESTination DIRectory. It is " "commonly used by makefile users " - "in order to install software at non-default location. " + "in order to install software at non-default location. " "It is usually invoked like this:\n" " make DESTDIR=/home/john install\n" "which will install the concerned software using the" @@ -665,10 +665,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY", cmProperty::VARIABLE, "Don't make the install target depend on the all target.", - "By default, the \"install\" target depends on the \"all\" target. " + "By default, the \"install\" target depends on the \"all\" target. " "This has the effect, that when \"make install\" is invoked or INSTALL " "is built, first the \"all\" target is built, then the installation " - "starts. " + "starts. " "If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency " "is not created, so the installation process will start immediately, " "independent from whether the project has been completely built or not." @@ -769,9 +769,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "directories contain incompatible but possibly linkable libraries. For " "example, on cross-compiled cluster environments, this allows a user to " "ignore directories containing libraries meant for the front-end " - "machine that modules like FindX11 (and others) would normally search. " + "machine that modules like FindX11 (and others) would normally search. " "By default this contains a list of directories containing incompatible " - "binaries for the host system. " + "binaries for the host system. " "See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_LIBRARY_PATH, " "CMAKE_SYSTEM_INCLUDE_PATH, and CMAKE_SYSTEM_PROGRAM_PATH.", false, "Variables That Change Behavior"); @@ -785,11 +785,11 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "directories contain incompatible but possibly linkable libraries. For " "example, on cross-compiled cluster environments, this allows a user to " "ignore directories containing libraries meant for the front-end " - "machine that modules like FindX11 (and others) would normally search. " - "By default this is empty; it is intended to be set by the project. " + "machine that modules like FindX11 (and others) would normally search. " + "By default this is empty; it is intended to be set by the project. " "Note that CMAKE_IGNORE_PATH takes a list of directory names, NOT a " "list of prefixes. If you want to ignore paths under prefixes (bin, " - "include, lib, etc.), you'll need to specify them explicitly. " + "include, lib, etc.), you'll need to specify them explicitly. " "See also CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH, " "CMAKE_PROGRAM_PATH.", false, "Variables That Change Behavior"); @@ -836,7 +836,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "although that package is installed.\n" "This switch should be used during the initial CMake run. Otherwise if " "the package has already been found in a previous CMake run, the " - "variables which have been stored in the cache will still be there. " + "variables which have been stored in the cache will still be there. " "In that case it is recommended to remove the cache variables for " "this package from the cache using the cache editor or cmake -U", false, "Variables That Change Behavior"); @@ -923,7 +923,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_COLOR_MAKEFILE", cmProperty::VARIABLE, "Enables color output when using the Makefile generator.", - "When enabled, the generated Makefiles will produce colored output. " + "When enabled, the generated Makefiles will produce colored output. " "Default is ON.",false, "Variables That Change Behavior"); @@ -975,7 +975,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Name of system cmake is compiling for.", "This variable is the composite of CMAKE_SYSTEM_NAME " "and CMAKE_SYSTEM_VERSION, like this " - "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. " + "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. " "If CMAKE_SYSTEM_VERSION is not set, then " "CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.",false, "Variables That Describe the System"); @@ -1237,7 +1237,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_INSTALL_RPATH", cmProperty::VARIABLE, "The rpath to use for installed targets.", "A semicolon-separated list specifying the rpath " - "to use in installed targets (for platforms that support it). " + "to use in installed targets (for platforms that support it). " "This is used to initialize the target property " "INSTALL_RPATH for all targets.", false, @@ -1248,7 +1248,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Add paths to linker search and installed rpath.", "CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true " "will append directories in the linker search path and outside the " - "project to the INSTALL_RPATH. " + "project to the INSTALL_RPATH. " "This is used to initialize the target property " "INSTALL_RPATH_USE_LINK_PATH for all targets.", false, @@ -1267,7 +1267,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_Fortran_FORMAT", cmProperty::VARIABLE, "Set to FIXED or FREE to indicate the Fortran source layout.", "This variable is used to initialize the Fortran_FORMAT " - "property on all the targets. " + "property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1276,7 +1276,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_Fortran_MODULE_DIRECTORY", cmProperty::VARIABLE, "Fortran module output directory.", "This variable is used to initialize the " - "Fortran_MODULE_DIRECTORY property on all the targets. " + "Fortran_MODULE_DIRECTORY property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1285,7 +1285,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_LIBRARY_OUTPUT_DIRECTORY", cmProperty::VARIABLE, "Where to put all the LIBRARY targets when built.", "This variable is used to initialize the " - "LIBRARY_OUTPUT_DIRECTORY property on all the targets. " + "LIBRARY_OUTPUT_DIRECTORY property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1294,7 +1294,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_ARCHIVE_OUTPUT_DIRECTORY", cmProperty::VARIABLE, "Where to put all the ARCHIVE targets when built.", "This variable is used to initialize the " - "ARCHIVE_OUTPUT_DIRECTORY property on all the targets. " + "ARCHIVE_OUTPUT_DIRECTORY property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1303,7 +1303,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_RUNTIME_OUTPUT_DIRECTORY", cmProperty::VARIABLE, "Where to put all the RUNTIME targets when built.", "This variable is used to initialize the " - "RUNTIME_OUTPUT_DIRECTORY property on all the targets. " + "RUNTIME_OUTPUT_DIRECTORY property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1312,7 +1312,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_PDB_OUTPUT_DIRECTORY", cmProperty::VARIABLE, "Where to put all the MS debug symbol files from linker.", "This variable is used to initialize the " - "PDB_OUTPUT_DIRECTORY property on all the targets. " + "PDB_OUTPUT_DIRECTORY property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1330,7 +1330,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_AUTOMOC", cmProperty::VARIABLE, "Whether to handle moc automatically for Qt targets.", "This variable is used to initialize the " - "AUTOMOC property on all the targets. " + "AUTOMOC property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1339,7 +1339,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_AUTOMOC_MOC_OPTIONS", cmProperty::VARIABLE, "Additional options for moc when using automoc (see CMAKE_AUTOMOC).", "This variable is used to initialize the " - "AUTOMOC_MOC_OPTIONS property on all the targets. " + "AUTOMOC_MOC_OPTIONS property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1473,7 +1473,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_LIBRARY_PATH_FLAG", cmProperty::VARIABLE, "The flag to be used to add a library search path to a compiler.", - "The flag will be used to specify a library directory to the compiler. " + "The flag will be used to specify a library directory to the compiler. " "On most compilers this is \"-L\".",false, "Variables that Control the Build"); cm->DefineProperty @@ -1500,7 +1500,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_USE_RELATIVE_PATHS", cmProperty::VARIABLE, "Use relative paths (May not work!).", "If this is set to TRUE, then CMake will use " - "relative paths between the source and binary tree. " + "relative paths between the source and binary tree. " "This option does not work for more complicated " "projects, and relative paths are used when possible. " "In general, it is not possible to move CMake generated" @@ -1534,7 +1534,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_LINK_INTERFACE_LIBRARIES", cmProperty::VARIABLE, "Default value for LINK_INTERFACE_LIBRARIES of targets.", "This variable is used to initialize the " - "LINK_INTERFACE_LIBRARIES property on all the targets. " + "LINK_INTERFACE_LIBRARIES property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1542,7 +1542,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_WIN32_EXECUTABLE", cmProperty::VARIABLE, "Default value for WIN32_EXECUTABLE of targets.", "This variable is used to initialize the " - "WIN32_EXECUTABLE property on all the targets. " + "WIN32_EXECUTABLE property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1550,7 +1550,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_MACOSX_BUNDLE", cmProperty::VARIABLE, "Default value for MACOSX_BUNDLE of targets.", "This variable is used to initialize the " - "MACOSX_BUNDLE property on all the targets. " + "MACOSX_BUNDLE property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1558,7 +1558,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_POSITION_INDEPENDENT_CODE", cmProperty::VARIABLE, "Default value for POSITION_INDEPENDENT_CODE of targets.", "This variable is used to initialize the " - "POSITION_INDEPENDENT_CODE property on all the targets. " + "POSITION_INDEPENDENT_CODE property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1566,7 +1566,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_<LANG>_VISIBILITY_PRESET", cmProperty::VARIABLE, "Default value for <LANG>_VISIBILITY_PRESET of targets.", "This variable is used to initialize the " - "<LANG>_VISIBILITY_PRESET property on all the targets. " + "<LANG>_VISIBILITY_PRESET property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1574,7 +1574,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_VISIBILITY_INLINES_HIDDEN", cmProperty::VARIABLE, "Default value for VISIBILITY_INLINES_HIDDEN of targets.", "This variable is used to initialize the " - "VISIBILITY_INLINES_HIDDEN property on all the targets. " + "VISIBILITY_INLINES_HIDDEN property on all the targets. " "See that target property for additional information.", false, "Variables that Control the Build"); @@ -1595,7 +1595,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_<LANG>_COMPILER", cmProperty::VARIABLE, "The full path to the compiler for LANG.", - "This is the command that will be used as the <LANG> compiler. " + "This is the command that will be used as the <LANG> compiler. " "Once set, you can not change this variable.",false, "Variables for Languages"); @@ -1671,7 +1671,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_COMPILER_IS_GNU<LANG>", cmProperty::VARIABLE, "True if the compiler is GNU.", "If the selected <LANG> compiler is the GNU " - "compiler then this is TRUE, if not it is FALSE. " + "compiler then this is TRUE, if not it is FALSE. " "Unlike the other per-language variables, this uses the GNU syntax for " "identifying languages instead of the CMake syntax. Recognized values of " "the <LANG> suffix are:\n" @@ -1709,7 +1709,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) cm->DefineProperty ("CMAKE_<LANG>_FLAGS_RELWITHDEBINFO", cmProperty::VARIABLE, "Flags for RelWithDebInfo type or configuration.", - "<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. " + "<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. " "Short for Release With Debug Information.",false, "Variables for Languages"); @@ -1773,7 +1773,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) ("CMAKE_<LANG>_IGNORE_EXTENSIONS", cmProperty::VARIABLE, "File extensions that should be ignored by the build.", "This is a list of file extensions that may be " - "part of a project for a given language but are not compiled. ",false, + "part of a project for a given language but are not compiled.",false, "Variables for Languages"); cm->DefineProperty diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index e7b185a..819ac37 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -93,7 +93,9 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target, { properties[i->first] = i->second.GetValue(); - if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0) + if(i->first.find("IMPORTED_LINK_INTERFACE_LIBRARIES") == 0 + || i->first.find("IMPORTED_LINK_DEPENDENT_LIBRARIES") == 0 + || i->first.find("INTERFACE_LINK_LIBRARIES") == 0) { const std::string libs = i->second.GetValue(); diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index e0c8c9e..abe4e70 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -574,14 +574,15 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode // Check if there is a proper config mapping for the tested config. std::vector<std::string> mappedConfigs; std::string mapProp = "MAP_IMPORTED_CONFIG_"; - mapProp += context->Config; + mapProp += cmSystemTools::UpperCase(context->Config); if(const char* mapValue = context->CurrentTarget->GetProperty(mapProp.c_str())) { cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue), mappedConfigs); return std::find(mappedConfigs.begin(), mappedConfigs.end(), - context->Config) != mappedConfigs.end() ? "1" : "0"; + cmSystemTools::UpperCase(parameters.front())) + != mappedConfigs.end() ? "1" : "0"; } } } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5ce0e6b..62ac263 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -80,6 +80,12 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir, config, false, this->Target, &dagChecker), result); } + for(std::vector<std::string>::iterator li = result.begin(); + li != result.end(); ++li) + { + cmSystemTools::ConvertToUnixSlashes(*li); + } + IncludeCacheType::value_type entry(config_upper, result); iter = this->SystemIncludesCache.insert(entry).first; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 0a95091..31e122e 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -81,6 +81,9 @@ public: void PathTooLong(cmTarget* target, cmSourceFile* sf, std::string const& sfRel); + + virtual const char* GetToolsVersion() { return "4.0"; } + protected: virtual const char* GetIDEVersion() { return "10.0"; } diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h index 064e310..8c8aeb1 100644 --- a/Source/cmGlobalVisualStudio12Generator.h +++ b/Source/cmGlobalVisualStudio12Generator.h @@ -31,6 +31,11 @@ public: /** TODO: VS 12 user macro support. */ virtual std::string GetUserMacrosDirectory() { return ""; } + + //in Visual Studio 2013 they detached the MSBuild tools version + //from the .Net Framework version and instead made it have it's own + //version number + virtual const char* GetToolsVersion() { return "12.0"; } protected: virtual const char* GetIDEVersion() { return "12.0"; } private: diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 57b86fd..4baf345 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -816,6 +816,18 @@ bool cmMakefile::NeedBackwardsCompatibility(unsigned int major, } } + +namespace +{ + struct file_exists + { + bool operator()(const std::string& path) const + { + return cmSystemTools::FileExists(path.c_str()); + } + }; +} + void cmMakefile::FinalPass() { // do all the variable expansions here @@ -829,6 +841,20 @@ void cmMakefile::FinalPass() (*i)->FinalPass(); } + //go through all configured files and see which ones still exist. + //we don't want cmake to re-run if a configured file is created and deleted + //during processing as that would make it a transient file that can't + //influence the build process + + //remove_if will move all items that don't have a valid file name to the + //back of the vector + std::vector<std::string>::iterator new_end = std::remove_if( + this->OutputFiles.begin(), + this->OutputFiles.end(), + file_exists() ); + //we just have to erase all items at the back + this->OutputFiles.erase(new_end, this->OutputFiles.end() ); + } // Generate the output file @@ -3419,11 +3445,12 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile, std::string sinfile = infile; this->AddCMakeDependFile(sinfile); cmSystemTools::ConvertToUnixSlashes(soutfile); + // Re-generate if non-temporary outputs are missing. - if(soutfile.find("CMakeTmp") == soutfile.npos) - { - this->AddCMakeOutputFile(soutfile); - } + //when we finalize the configuration we will remove all + //output files that now don't exist. + this->AddCMakeOutputFile(soutfile); + mode_t perm = 0; cmSystemTools::GetPermissions(sinfile.c_str(), perm); std::string::size_type pos = soutfile.rfind('/'); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 13cd006..147c332 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1617,7 +1617,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->IsApple = this->Makefile->IsOn("APPLE"); // Setup default property values. - this->SetPropertyDefault("INSTALL_NAME_DIR", ""); + this->SetPropertyDefault("INSTALL_NAME_DIR", 0); this->SetPropertyDefault("INSTALL_RPATH", ""); this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF"); @@ -3303,7 +3303,10 @@ static void processIncludeDirectories(cmTarget *tgt, if (!noMessage) { tgt->GetMakefile()->IssueMessage(messageType, e.str().c_str()); - return; + if (messageType == cmake::FATAL_ERROR) + { + return; + } } } @@ -4567,6 +4570,10 @@ bool cmTarget::HasMacOSXRpath(const char* config) { install_name_is_rpath = true; } + else if(install_name && use_install_name) + { + return false; + } } else { @@ -5299,18 +5306,18 @@ std::string cmTarget::GetInstallNameDirForInstallTree() if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME")) { std::string dir; + const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(!this->Makefile->IsOn("CMAKE_SKIP_RPATH") && !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH")) { - const char* install_name_dir = this->GetProperty("INSTALL_NAME_DIR"); if(install_name_dir && *install_name_dir) { dir = install_name_dir; dir += "/"; } } - if(dir.empty() && this->GetPropertyAsBool("MACOSX_RPATH")) + if(!install_name_dir && this->GetPropertyAsBool("MACOSX_RPATH")) { dir = "@rpath/"; } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index ea05347..a26b291 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -216,12 +216,16 @@ void cmVisualStudio10TargetGenerator::Generate() // Write the encoding header into the file char magic[] = {0xEF,0xBB, 0xBF}; this->BuildFileStream->write(magic, 3); - this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0); - this->WriteString("<Project DefaultTargets=\"Build\" " - "ToolsVersion=\"4.0\" " - "xmlns=\"http://schemas.microsoft.com/" - "developer/msbuild/2003\">\n", - 0); + + //get the tools version to use + const std::string toolsVer(this->GlobalGenerator->GetToolsVersion()); + std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; + project_defaults.append("<Project DefaultTargets=\"Build\" ToolsVersion=\""); + project_defaults.append(toolsVer +"\" "); + project_defaults.append( + "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"); + this->WriteString(project_defaults.c_str(),0); + this->WriteProjectConfigurations(); this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1); this->WriteString("<ProjectGUID>", 2); @@ -716,12 +720,16 @@ void cmVisualStudio10TargetGenerator::WriteGroups() fout.write(magic, 3); cmGeneratedFileStream* save = this->BuildFileStream; this->BuildFileStream = & fout; - this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" - "<Project " - "ToolsVersion=\"4.0\" " - "xmlns=\"http://schemas.microsoft.com/" - "developer/msbuild/2003\">\n", - 0); + + //get the tools version to use + const std::string toolsVer(this->GlobalGenerator->GetToolsVersion()); + std::string project_defaults="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; + project_defaults.append("<Project ToolsVersion=\""); + project_defaults.append(toolsVer +"\" "); + project_defaults.append( + "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"); + this->WriteString(project_defaults.c_str(),0); + for(ToolSourceMap::const_iterator ti = this->Tools.begin(); ti != this->Tools.end(); ++ti) { |