summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-commands.7.rst6
-rw-r--r--Help/manual/cmake-developer.7.rst10
-rw-r--r--Help/manual/cmake-generators.7.rst2
-rw-r--r--Help/manual/cmake-modules.7.rst2
-rw-r--r--Help/manual/cmake-policies.7.rst2
-rw-r--r--Help/manual/cmake-properties.7.rst12
-rw-r--r--Help/manual/cmake-variables.7.rst13
-rw-r--r--Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst13
-rw-r--r--Modules/CPack.cmake5
-rw-r--r--Modules/FindBoost.cmake45
-rw-r--r--Modules/Platform/UnixPaths.cmake9
-rw-r--r--Modules/Platform/WindowsPaths.cmake18
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx9
-rw-r--r--Source/CTest/cmCTestP4.cxx12
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx44
-rw-r--r--Source/cmComputeLinkDepends.cxx3
-rw-r--r--Source/cmComputeLinkDepends.h7
-rw-r--r--Source/cmComputeLinkInformation.cxx4
-rw-r--r--Source/cmComputeLinkInformation.h8
-rw-r--r--Source/cmCoreTryCompile.cxx2
-rw-r--r--Source/cmExportFileGenerator.cxx6
-rw-r--r--Source/cmExportFileGenerator.h6
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx18
-rw-r--r--Source/cmExportTryCompileFileGenerator.h12
-rw-r--r--Source/cmGeneratorExpression.cxx6
-rw-r--r--Source/cmGeneratorExpression.h10
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx14
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h8
-rw-r--r--Source/cmGlobalGenerator.cxx1
-rw-r--r--Source/cmMacroCommand.cxx105
-rw-r--r--Source/cmOrderDirectories.cxx2
-rw-r--r--Source/cmOrderDirectories.h4
-rw-r--r--Source/cmRST.cxx12
-rw-r--r--Source/cmRST.h2
-rw-r--r--Source/cmSystemTools.cxx49
-rw-r--r--Source/cmTarget.cxx211
-rw-r--r--Source/cmTarget.h163
-rw-r--r--Tests/CMakeLib/testRST.expect7
-rw-r--r--Tests/CMakeLib/testRST.rst7
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt3
-rw-r--r--Tests/CPackComponentsForAll/license.txt3
-rw-r--r--Tests/CTestUpdateCommon.cmake9
-rw-r--r--Tests/CTestUpdateP4.cmake.in1
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt26
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/empty.c0
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-result.txt1
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt9
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource.cmake1
-rw-r--r--Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/ForEachBracket1.cmake3
-rw-r--r--Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/FunctionBracket1.cmake6
-rw-r--r--Tests/RunCMake/Syntax/MacroBracket1-stderr.txt2
-rw-r--r--Tests/RunCMake/Syntax/MacroBracket1.cmake6
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/no_install_prefix/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/no_install_prefix/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/no_install_prefix/do_test.cmake2
-rw-r--r--Tests/RunCMake/no_install_prefix/no_install_prefix-result.txt1
-rw-r--r--Tests/RunCMake/no_install_prefix/no_install_prefix-stderr.txt18
-rw-r--r--Tests/RunCMake/no_install_prefix/no_install_prefix.cmake2
-rw-r--r--Tests/RunCMake/no_install_prefix/with_install_prefix-result.txt1
-rw-r--r--Tests/RunCMake/no_install_prefix/with_install_prefix-stderr.txt1
-rw-r--r--Tests/RunCMake/no_install_prefix/with_install_prefix.cmake2
71 files changed, 633 insertions, 378 deletions
diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst
index 9b23efa..fb0d2b5 100644
--- a/Help/manual/cmake-commands.7.rst
+++ b/Help/manual/cmake-commands.7.rst
@@ -13,6 +13,8 @@ Normal Commands
These commands may be used freely in CMake projects.
.. toctree::
+ :maxdepth: 1
+
/command/add_compile_options
/command/add_custom_command
/command/add_custom_target
@@ -105,6 +107,8 @@ These commands are available only for compatibility with older
versions of CMake. Do not use them in new code.
.. toctree::
+ :maxdepth: 1
+
/command/build_name
/command/exec_program
/command/export_library_dependencies
@@ -128,6 +132,8 @@ CTest Commands
These commands are available only in ctest scripts.
.. toctree::
+ :maxdepth: 1
+
/command/ctest_build
/command/ctest_configure
/command/ctest_coverage
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index ee2016f..5d20c54 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -68,11 +68,21 @@ literal block after ``::``
space. We prefer the ``::`` to appear at the end of a paragraph
line instead of as its own line.
+``note`` directive
+ Call out a side note. The command-line help processor prints the
+ block content as if the lines were normal paragraph text with
+ interpretation.
+
``parsed-literal`` directive
Add a literal block with markup interpretation. The command-line
help processor prints the block content without the leading
directive line and with common indentation replaced by one space.
+``productionlist`` directive
+ Render context-free grammar productions. The command-line help
+ processor prints the block content as if the lines were normal
+ paragraph text with interpretation.
+
``replace`` directive
Define a ``|substitution|`` replacement.
The command-line help processor requires a substitution replacement
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index a290d1a..ec1f58a 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -11,6 +11,8 @@ All Generators
==============
.. toctree::
+ :maxdepth: 1
+
/generator/Borland Makefiles
/generator/CodeBlocks - MinGW Makefiles
/generator/CodeBlocks - Ninja
diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 1f3e59f..01efcf7 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -11,6 +11,8 @@ All Modules
===========
.. toctree::
+ :maxdepth: 1
+
/module/AddFileDependencies
/module/BundleUtilities
/module/CheckCCompilerFlag
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index e3cf74d..5879a30 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -31,6 +31,8 @@ All Policies
============
.. toctree::
+ :maxdepth: 1
+
/policy/CMP0000
/policy/CMP0001
/policy/CMP0002
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 7fe1bf2..d6d42ad 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -11,6 +11,8 @@ Properties of Global Scope
==========================
.. toctree::
+ :maxdepth: 1
+
/prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS
/prop_gbl/AUTOGEN_TARGETS_FOLDER
/prop_gbl/AUTOMOC_TARGETS_FOLDER
@@ -39,6 +41,8 @@ Properties on Directories
=========================
.. toctree::
+ :maxdepth: 1
+
/prop_dir/ADDITIONAL_MAKE_CLEAN_FILES
/prop_dir/CACHE_VARIABLES
/prop_dir/CLEAN_NO_CUSTOM
@@ -68,6 +72,8 @@ Properties on Targets
=====================
.. toctree::
+ :maxdepth: 1
+
/prop_tgt/ALIASED_TARGET
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
@@ -220,6 +226,8 @@ Properties on Tests
===================
.. toctree::
+ :maxdepth: 1
+
/prop_test/ATTACHED_FILES_ON_FAIL
/prop_test/ATTACHED_FILES
/prop_test/COST
@@ -241,6 +249,8 @@ Properties on Source Files
==========================
.. toctree::
+ :maxdepth: 1
+
/prop_sf/ABSTRACT
/prop_sf/AUTOUIC_OPTIONS
/prop_sf/AUTORCC_OPTIONS
@@ -265,6 +275,8 @@ Properties on Cache Entries
===========================
.. toctree::
+ :maxdepth: 1
+
/prop_cache/ADVANCED
/prop_cache/HELPSTRING
/prop_cache/MODIFIED
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index dccaf64..26205a8 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -11,6 +11,8 @@ Variables that Provide Information
==================================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_ARGC
/variable/CMAKE_ARGV0
/variable/CMAKE_AR
@@ -76,6 +78,8 @@ Variables that Change Behavior
==============================
.. toctree::
+ :maxdepth: 1
+
/variable/BUILD_SHARED_LIBS
/variable/CMAKE_ABSOLUTE_DESTINATION_FILES
/variable/CMAKE_AUTOMOC_RELAXED_MODE
@@ -90,6 +94,7 @@ Variables that Change Behavior
/variable/CMAKE_FIND_LIBRARY_PREFIXES
/variable/CMAKE_FIND_LIBRARY_SUFFIXES
/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE
+ /variable/CMAKE_FIND_NO_INSTALL_PREFIX
/variable/CMAKE_IGNORE_PATH
/variable/CMAKE_INCLUDE_PATH
/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
@@ -115,6 +120,8 @@ Variables that Describe the System
==================================
.. toctree::
+ :maxdepth: 1
+
/variable/APPLE
/variable/BORLAND
/variable/CMAKE_CL_64
@@ -154,6 +161,8 @@ Variables that Control the Build
================================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
/variable/CMAKE_AUTOMOC_MOC_OPTIONS
/variable/CMAKE_AUTOMOC
@@ -208,6 +217,8 @@ Variables for Languages
=======================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_COMPILER_IS_GNULANG
/variable/CMAKE_Fortran_MODDIR_DEFAULT
/variable/CMAKE_Fortran_MODDIR_FLAG
@@ -251,6 +262,8 @@ Variables for CPack
===================
.. toctree::
+ :maxdepth: 1
+
/variable/CPACK_ABSOLUTE_DESTINATION_FILES
/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
diff --git a/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst
new file mode 100644
index 0000000..91231b0
--- /dev/null
+++ b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst
@@ -0,0 +1,13 @@
+CMAKE_FIND_NO_INSTALL_PREFIX
+----------------------------
+
+Ignore the :variable:`CMAKE_INSTALL_PREFIX` when searching for assets.
+
+CMake adds the :variable:`CMAKE_INSTALL_PREFIX` to the
+:variable:`CMAKE_SYSTEM_PREFIX_PATH` by default. This variable may be set
+on the command line to control that behavior.
+
+Set :variable:`CMAKE_FIND_NO_INSTALL_PREFIX` to TRUE to tell find_package not
+to search in the :variable:`CMAKE_INSTALL_PREFIX` by default. Note that the
+prefix may still be searched for other reasons, such as being the same prefix
+as the CMake installation, or for being a built-in system prefix.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index da6b2e0..2d641f5 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -519,6 +519,11 @@ cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
# WiX specific variables
cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
+# set sysroot so SDK tools can be used
+if(CMAKE_OSX_SYSROOT)
+ cpack_set_if_not_set(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+endif()
+
if(DEFINED CPACK_COMPONENTS_ALL)
if(CPACK_MONOLITHIC_INSTALL)
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6e1c926..51a3d77 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -4,9 +4,7 @@
#
# Find Boost include dirs and libraries
#
-# Use this module by invoking find_package with the form:
-#
-# ::
+# Use this module by invoking find_package with the form::
#
# find_package(Boost
# [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
@@ -17,9 +15,7 @@
# This module finds headers and requested component libraries OR a CMake
# package configuration file provided by a "Boost CMake" build. For the
# latter case skip to the "Boost CMake" section below. For the former
-# case results are reported in variables:
-#
-# ::
+# case results are reported in variables::
#
# Boost_FOUND - True if headers and requested libraries were found
# Boost_INCLUDE_DIRS - Boost include directories
@@ -38,11 +34,7 @@
# information about Boost's automatic linking
# displayed during compilation
#
-#
-#
-# This module reads hints about search locations from variables:
-#
-# ::
+# This module reads hints about search locations from variables::
#
# BOOST_ROOT - Preferred installation prefix
# (or BOOSTROOT)
@@ -54,9 +46,7 @@
# - List of Boost versions not known to this module
# (Boost install locations may contain the version)
#
-# and saves search results persistently in CMake cache entries:
-#
-# ::
+# and saves search results persistently in CMake cache entries::
#
# Boost_INCLUDE_DIR - Directory containing Boost headers
# Boost_LIBRARY_DIR - Directory containing Boost libraries
@@ -83,9 +73,7 @@
#
# Boost libraries come in many variants encoded in their file name.
# Users or projects may tell this module which variant to find by
-# setting variables:
-#
-# ::
+# setting variables::
#
# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
# libraries ('mt' tag). Default is ON.
@@ -109,9 +97,7 @@
# such as "pthread" or "win32". Names with
# and without this suffix will both be tried.
#
-# Other variables one may set to control this module are:
-#
-# ::
+# Other variables one may set to control this module are::
#
# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
# Please enable this before filing any bug report.
@@ -132,17 +118,13 @@
# to be linked explicitly or available in the link library search path.
# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
# dynamic linking. Boost automatic linking typically requests static
-# libraries with a few exceptions (such as Boost.Python). Use
-#
-# ::
+# libraries with a few exceptions (such as Boost.Python). Use::
#
# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
#
# to ask Boost to report information about automatic linking requests.
#
-# Example to find Boost headers only:
-#
-# ::
+# Example to find Boost headers only::
#
# find_package(Boost 1.36.0)
# if(Boost_FOUND)
@@ -150,11 +132,9 @@
# add_executable(foo foo.cc)
# endif()
#
-# Example to find Boost headers and some libraries:
+# Example to find Boost headers and some *static* libraries::
#
-# ::
-#
-# set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_STATIC_LIBS ON) # only find static libs
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_RUNTIME OFF)
# find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
@@ -164,9 +144,8 @@
# target_link_libraries(foo ${Boost_LIBRARIES})
# endif()
#
-#
-#
-# Boost CMake ----------------------------------------------------------
+# Boost CMake
+# ^^^^^^^^^^^
#
# If Boost was built using the boost-cmake project it provides a package
# configuration file for use with find_package's Config mode. This
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index ccb2663..7a424c4 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -37,10 +37,13 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# CMake install location
"${_CMAKE_INSTALL_DIR}"
-
- # Project install destination.
- "${CMAKE_INSTALL_PREFIX}"
)
+if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # Project install destination.
+ "${CMAKE_INSTALL_PREFIX}"
+ )
+endif()
# List common include file locations not under the common prefixes.
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index fc921d7..c231495 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -73,11 +73,13 @@ get_filename_component(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
-# Add other locations.
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH
- # Project install destination.
- "${CMAKE_INSTALL_PREFIX}"
- )
+if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
+ # Add other locations.
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # Project install destination.
+ "${CMAKE_INSTALL_PREFIX}"
+ )
+endif()
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
@@ -88,8 +90,12 @@ list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
)
# mingw can also link against dlls which can also be in /bin, so list this too
+if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
+ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+ "${CMAKE_INSTALL_PREFIX}/bin"
+ )
+endif()
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- "${CMAKE_INSTALL_PREFIX}/bin"
"${_CMAKE_INSTALL_DIR}/bin"
/bin
)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 785fc87..47caddd 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20131031)
+set(CMake_VERSION_TWEAK 20131104)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index d973c01..dfb2f15 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -474,7 +474,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
udco_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
udco_image_command << " convert \"" << temp_image << "\"";
udco_image_command << " -format UDCO";
- udco_image_command << " -o \"" << temp_udco << "\"";
+ udco_image_command << " -ov -o \"" << temp_udco << "\"";
std::string error;
if(!this->RunCommand(udco_image_command, &error))
@@ -504,6 +504,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Rez the SLA
cmOStringStream embed_sla_command;
embed_sla_command << this->GetOption("CPACK_COMMAND_REZ");
+ const char* sysroot = this->GetOption("CPACK_OSX_SYSROOT");
+ if(sysroot && sysroot[0] != '\0')
+ {
+ embed_sla_command << " -isysroot \"" << sysroot << "\"";
+ }
embed_sla_command << " \"" << sla_r << "\"";
embed_sla_command << " -a -o ";
embed_sla_command << "\"" << temp_udco << "\"";
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 6e9d0e3..4c39d10 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -441,6 +441,8 @@ int cmCTestMultiProcessHandler::SearchByName(std::string name)
//---------------------------------------------------------
void cmCTestMultiProcessHandler::CreateTestCostList()
{
+ TestSet alreadySortedTests;
+
std::list<TestSet> priorityStack;
priorityStack.push_back(TestSet());
TestSet &topLevel = priorityStack.back();
@@ -456,6 +458,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
{
//If the test failed last time, it should be run first.
this->SortedTests.push_back(i->first);
+ alreadySortedTests.insert(i->first);
}
else
{
@@ -513,7 +516,11 @@ void cmCTestMultiProcessHandler::CreateTestCostList()
for(TestList::const_iterator j = sortedCopy.begin();
j != sortedCopy.end(); ++j)
{
- this->SortedTests.push_back(*j);
+ if(alreadySortedTests.find(*j) == alreadySortedTests.end())
+ {
+ this->SortedTests.push_back(*j);
+ alreadySortedTests.insert(*j);
+ }
}
}
}
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index a504157..0058721 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -144,17 +144,7 @@ private:
if(!this->Line.empty() && this->Line[0] == '='
&& this->RegexDiff.find(this->Line))
{
- std::string Path = this->RegexDiff.match(1);
- // See if we need to remove the //depot prefix
- if(Path.length() > 2 && Path[0] == '/' && Path[1] == '/')
- {
- size_t found = Path.find('/', 2);
- if(found != std::string::npos)
- {
- Path = Path.substr(found + 1);
- }
- }
- CurrentPath = Path;
+ CurrentPath = this->RegexDiff.match(1);
AlreadyNotified = false;
}
else
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index a4dfdc9..a7665c8 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -1230,7 +1230,7 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
QString search = this->FindHistory.front();
- QTextCursor cursor = this->Output->textCursor();
+ QTextCursor textCursor = this->Output->textCursor();
QTextDocument* document = this->Output->document();
QTextDocument::FindFlags flags;
if (!directionForward)
@@ -1238,67 +1238,67 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
flags |= QTextDocument::FindBackward;
}
- cursor = document->find(search, cursor, flags);
+ textCursor = document->find(search, textCursor, flags);
- if (cursor.isNull())
+ if (textCursor.isNull())
{
// first search found nothing, wrap around and search again
- cursor = this->Output->textCursor();
- cursor.movePosition(directionForward ? QTextCursor::Start
- : QTextCursor::End);
- cursor = document->find(search, cursor, flags);
+ textCursor = this->Output->textCursor();
+ textCursor.movePosition(directionForward ? QTextCursor::Start
+ : QTextCursor::End);
+ textCursor = document->find(search, textCursor, flags);
}
- if (cursor.hasSelection())
+ if (textCursor.hasSelection())
{
- this->Output->setTextCursor(cursor);
+ this->Output->setTextCursor(textCursor);
}
}
void CMakeSetupDialog::doOutputErrorNext()
{
- QTextCursor cursor = this->Output->textCursor();
+ QTextCursor textCursor = this->Output->textCursor();
bool atEnd = false;
// move cursor out of current error-block
- if (cursor.blockCharFormat() == this->ErrorFormat)
+ if (textCursor.blockCharFormat() == this->ErrorFormat)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
// move cursor to next error-block
- while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+ while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
if (atEnd)
{
// first search found nothing, wrap around and search again
- atEnd = !cursor.movePosition(QTextCursor::Start);
+ atEnd = !textCursor.movePosition(QTextCursor::Start);
// move cursor to next error-block
- while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+ while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
}
if (!atEnd)
{
- cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ textCursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
QTextCharFormat selectionFormat;
selectionFormat.setBackground(Qt::yellow);
- QTextEdit::ExtraSelection extraSelection = {cursor, selectionFormat};
+ QTextEdit::ExtraSelection extraSelection = {textCursor, selectionFormat};
this->Output->setExtraSelections(QList<QTextEdit::ExtraSelection>()
<< extraSelection);
// make the whole error-block visible
- this->Output->setTextCursor(cursor);
+ this->Output->setTextCursor(textCursor);
// remove the selection to see the extraSelection
- cursor.setPosition(cursor.anchor());
- this->Output->setTextCursor(cursor);
+ textCursor.setPosition(textCursor.anchor());
+ this->Output->setTextCursor(textCursor);
}
}
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index a2f3f7d..31cc393 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -172,7 +172,8 @@ satisfy dependencies.
//----------------------------------------------------------------------------
cmComputeLinkDepends
-::cmComputeLinkDepends(cmTarget* target, const char* config, cmTarget* head)
+::cmComputeLinkDepends(cmTarget const* target, const char* config,
+ cmTarget const* head)
{
// Store context information.
this->Target = target;
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 1d5d1b9..b86c9b2 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -32,7 +32,8 @@ class cmake;
class cmComputeLinkDepends
{
public:
- cmComputeLinkDepends(cmTarget* target, const char* config, cmTarget *head);
+ cmComputeLinkDepends(cmTarget const* target, const char* config,
+ cmTarget const* head);
~cmComputeLinkDepends();
// Basic information about each link item.
@@ -58,8 +59,8 @@ public:
private:
// Context information.
- cmTarget* Target;
- cmTarget* HeadTarget;
+ cmTarget const* Target;
+ cmTarget const* HeadTarget;
cmMakefile* Makefile;
cmLocalGenerator* LocalGenerator;
cmGlobalGenerator* GlobalGenerator;
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index d3b28ed..d4644c3 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -239,8 +239,8 @@ because this need be done only for shared libraries without soname-s.
//----------------------------------------------------------------------------
cmComputeLinkInformation
-::cmComputeLinkInformation(cmTarget* target, const char* config,
- cmTarget *headTarget)
+::cmComputeLinkInformation(cmTarget const* target, const char* config,
+ cmTarget const* headTarget)
{
// Store context information.
this->Target = target;
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index e6ee871..1da5495 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -29,8 +29,8 @@ class cmOrderDirectories;
class cmComputeLinkInformation
{
public:
- cmComputeLinkInformation(cmTarget* target, const char* config,
- cmTarget* headTarget);
+ cmComputeLinkInformation(cmTarget const* target, const char* config,
+ cmTarget const* headTarget);
~cmComputeLinkInformation();
bool Compute();
@@ -74,8 +74,8 @@ private:
std::set<cmTarget*> SharedLibrariesLinked;
// Context information.
- cmTarget* Target;
- cmTarget* HeadTarget;
+ cmTarget const* Target;
+ cmTarget const* HeadTarget;
cmMakefile* Makefile;
cmLocalGenerator* LocalGenerator;
cmGlobalGenerator* GlobalGenerator;
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 0ac969b..479a699 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -34,7 +34,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
std::string outputVariable;
std::string copyFile;
std::string copyFileError;
- std::vector<cmTarget*> targets;
+ std::vector<cmTarget const*> targets;
std::string libsToLink = " ";
bool useOldLinkLibs = true;
char targetNameBuf[64];
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 65f1cc6..03e8dff 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -463,7 +463,7 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
}
//----------------------------------------------------------------------------
-void cmExportFileGenerator::GenerateInterfaceProperties(cmTarget *target,
+void cmExportFileGenerator::GenerateInterfaceProperties(cmTarget const* target,
std::ostream& os,
const ImportPropertyMap &properties)
{
@@ -885,7 +885,7 @@ void cmExportFileGenerator::GenerateExpectedTargetsCode(std::ostream& os,
//----------------------------------------------------------------------------
void
cmExportFileGenerator
-::GenerateImportTargetCode(std::ostream& os, cmTarget* target)
+::GenerateImportTargetCode(std::ostream& os, cmTarget const* target)
{
// Construct the imported target name.
std::string targetName = this->Namespace;
@@ -951,7 +951,7 @@ cmExportFileGenerator
void
cmExportFileGenerator
::GenerateImportPropertyCode(std::ostream& os, const char* config,
- cmTarget* target,
+ cmTarget const* target,
ImportPropertyMap const& properties)
{
// Construct the imported target name.
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index f3d0807..6fd23b0 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -60,9 +60,9 @@ protected:
void GenerateImportHeaderCode(std::ostream& os, const char* config = 0);
void GenerateImportFooterCode(std::ostream& os);
void GenerateImportVersionCode(std::ostream& os);
- void GenerateImportTargetCode(std::ostream& os, cmTarget* target);
+ void GenerateImportTargetCode(std::ostream& os, cmTarget const* target);
void GenerateImportPropertyCode(std::ostream& os, const char* config,
- cmTarget* target,
+ cmTarget const* target,
ImportPropertyMap const& properties);
void GenerateImportedFileChecksCode(std::ostream& os, cmTarget* target,
ImportPropertyMap const& properties,
@@ -115,7 +115,7 @@ protected:
ImportPropertyMap &properties);
void PopulateCompatibleInterfaceProperties(cmTarget *target,
ImportPropertyMap &properties);
- void GenerateInterfaceProperties(cmTarget *target, std::ostream& os,
+ void GenerateInterfaceProperties(cmTarget const* target, std::ostream& os,
const ImportPropertyMap &properties);
void PopulateIncludeDirectoriesInterface(
cmTargetExport *target,
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index 819ac37..b70fed6 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -18,11 +18,11 @@
//----------------------------------------------------------------------------
bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os)
{
- std::set<cmTarget*> emitted;
- std::set<cmTarget*> emittedDeps;
+ std::set<cmTarget const*> emitted;
+ std::set<cmTarget const*> emittedDeps;
while(!this->Exports.empty())
{
- cmTarget* te = this->Exports.back();
+ cmTarget const* te = this->Exports.back();
this->Exports.pop_back();
if (emitted.insert(te).second)
{
@@ -45,8 +45,8 @@ bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os)
}
std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName,
- cmTarget *tgt,
- std::set<cmTarget*> &emitted)
+ cmTarget const* tgt,
+ std::set<cmTarget const*> &emitted)
{
const char *prop = tgt->GetProperty(propName);
if(!prop)
@@ -70,8 +70,8 @@ std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName,
std::string result = cge->Evaluate(tgt->GetMakefile(), this->Config,
false, &dummyHead, tgt, &dagChecker);
- const std::set<cmTarget*> &allTargets = cge->GetAllTargetsSeen();
- for(std::set<cmTarget*>::const_iterator li = allTargets.begin();
+ const std::set<cmTarget const*> &allTargets = cge->GetAllTargetsSeen();
+ for(std::set<cmTarget const*>::const_iterator li = allTargets.begin();
li != allTargets.end(); ++li)
{
if(emitted.insert(*li).second)
@@ -84,9 +84,9 @@ std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName,
//----------------------------------------------------------------------------
void
-cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target,
+cmExportTryCompileFileGenerator::PopulateProperties(cmTarget const* target,
ImportPropertyMap& properties,
- std::set<cmTarget*> &emitted)
+ std::set<cmTarget const*> &emitted)
{
cmPropertyMap props = target->GetProperties();
for(cmPropertyMap::const_iterator i = props.begin(); i != props.end(); ++i)
diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h
index 91b4a61..71ac0dd 100644
--- a/Source/cmExportTryCompileFileGenerator.h
+++ b/Source/cmExportTryCompileFileGenerator.h
@@ -21,7 +21,7 @@ class cmExportTryCompileFileGenerator: public cmExportFileGenerator
{
public:
/** Set the list of targets to export. */
- void SetExports(const std::vector<cmTarget*> &exports)
+ void SetExports(const std::vector<cmTarget const*> &exports)
{ this->Exports = exports; }
void SetConfig(const char *config) { this->Config = config; }
protected:
@@ -39,18 +39,18 @@ protected:
cmTarget*,
cmTarget*) {}
- void PopulateProperties(cmTarget* target,
+ void PopulateProperties(cmTarget const* target,
ImportPropertyMap& properties,
- std::set<cmTarget*> &emitted);
+ std::set<cmTarget const*> &emitted);
std::string InstallNameDir(cmTarget* target,
const std::string& config);
private:
- std::string FindTargets(const char *prop, cmTarget *tgt,
- std::set<cmTarget*> &emitted);
+ std::string FindTargets(const char *prop, cmTarget const* tgt,
+ std::set<cmTarget const*> &emitted);
- std::vector<cmTarget*> Exports;
+ std::vector<cmTarget const*> Exports;
const char *Config;
};
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 97853f3..f34a35b 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -53,7 +53,7 @@ cmGeneratorExpression::~cmGeneratorExpression()
//----------------------------------------------------------------------------
const char *cmCompiledGeneratorExpression::Evaluate(
cmMakefile* mf, const char* config, bool quiet,
- cmTarget *headTarget,
+ cmTarget const* headTarget,
cmGeneratorExpressionDAGChecker *dagChecker) const
{
return this->Evaluate(mf,
@@ -67,8 +67,8 @@ const char *cmCompiledGeneratorExpression::Evaluate(
//----------------------------------------------------------------------------
const char *cmCompiledGeneratorExpression::Evaluate(
cmMakefile* mf, const char* config, bool quiet,
- cmTarget *headTarget,
- cmTarget *currentTarget,
+ cmTarget const* headTarget,
+ cmTarget const* currentTarget,
cmGeneratorExpressionDAGChecker *dagChecker) const
{
if (!this->NeedsEvaluation)
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index bc0f6c2..4992e93 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -80,12 +80,12 @@ class cmCompiledGeneratorExpression
public:
const char* Evaluate(cmMakefile* mf, const char* config,
bool quiet = false,
- cmTarget *headTarget = 0,
- cmTarget *currentTarget = 0,
+ cmTarget const* headTarget = 0,
+ cmTarget const* currentTarget = 0,
cmGeneratorExpressionDAGChecker *dagChecker = 0) const;
const char* Evaluate(cmMakefile* mf, const char* config,
bool quiet,
- cmTarget *headTarget,
+ cmTarget const* headTarget,
cmGeneratorExpressionDAGChecker *dagChecker) const;
/** Get set of targets found during evaluations. */
@@ -95,7 +95,7 @@ public:
std::set<cmStdString> const& GetSeenTargetProperties() const
{ return this->SeenTargetProperties; }
- std::set<cmTarget*> const& GetAllTargetsSeen() const
+ std::set<cmTarget const*> const& GetAllTargetsSeen() const
{ return this->AllTargetsSeen; }
~cmCompiledGeneratorExpression();
@@ -129,7 +129,7 @@ private:
bool NeedsEvaluation;
mutable std::set<cmTarget*> DependTargets;
- mutable std::set<cmTarget*> AllTargetsSeen;
+ mutable std::set<cmTarget const*> AllTargetsSeen;
mutable std::set<cmStdString> SeenTargetProperties;
mutable std::string Output;
mutable bool HadContextSensitiveCondition;
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index f92c18e..107ef73 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -661,8 +661,8 @@ static const char* targetPropertyTransitiveWhitelist[] = {
};
std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
- cmTarget *target,
- cmTarget *headTarget,
+ cmTarget const* target,
+ cmTarget const* headTarget,
cmGeneratorExpressionContext *context,
cmGeneratorExpressionDAGChecker *dagChecker,
const std::string &interfacePropertyName)
@@ -726,7 +726,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmsys::RegularExpression propertyNameValidator;
propertyNameValidator.compile("^[A-Za-z0-9_]+$");
- cmTarget* target = context->HeadTarget;
+ cmTarget const* target = context->HeadTarget;
std::string propertyName = *parameters.begin();
if (!target && parameters.size() == 1)
@@ -914,7 +914,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName = "INTERFACE_COMPILE_OPTIONS";
}
- cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target;
+ cmTarget const* headTarget = context->HeadTarget
+ ? context->HeadTarget : target;
const char * const *transBegin =
cmArrayBegin(targetPropertyTransitiveWhitelist) + 1;
@@ -1091,7 +1092,8 @@ static const char* targetPolicyWhitelist[] = {
#undef TARGET_POLICY_STRING
};
-cmPolicies::PolicyStatus statusForTarget(cmTarget *tgt, const char *policy)
+cmPolicies::PolicyStatus statusForTarget(cmTarget const* tgt,
+ const char *policy)
{
#define RETURN_POLICY(POLICY) \
if (strcmp(policy, #POLICY) == 0) \
@@ -1339,7 +1341,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
"No target \"" + name + "\"");
return std::string();
}
- if(target->GetType() >= cmTarget::UTILITY &&
+ if(target->GetType() >= cmTarget::OBJECT_LIBRARY &&
target->GetType() != cmTarget::UNKNOWN_LIBRARY)
{
::reportError(context, content->GetOriginalExpression(),
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index 343e18b..49e52df 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -24,13 +24,13 @@ struct cmGeneratorExpressionContext
{
cmListFileBacktrace Backtrace;
std::set<cmTarget*> DependTargets;
- std::set<cmTarget*> AllTargets;
+ std::set<cmTarget const*> AllTargets;
std::set<cmStdString> SeenTargetProperties;
cmMakefile *Makefile;
const char *Config;
- cmTarget *HeadTarget; // The target whose property is being evaluated.
- cmTarget *CurrentTarget; // The dependent of HeadTarget which appears
- // directly or indirectly in the property.
+ cmTarget const* HeadTarget; // The target whose property is being evaluated.
+ cmTarget const* CurrentTarget; // The dependent of HeadTarget which appears
+ // directly or indirectly in the property.
bool Quiet;
bool HadError;
bool HadContextSensitiveCondition;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8a8d61a..4fe5033 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1242,6 +1242,7 @@ bool cmGlobalGenerator::CheckTargets()
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY ||
+ target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::UTILITY)
{
if(!target.FindSourceFiles())
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index fd6537f..499d3c6 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -140,75 +140,82 @@ bool cmMacroHelperCommand::InvokeInitialPass
// Set the FilePath on the arguments to match the function since it is
// not stored and the original values may be freed
k->FilePath = this->FilePath.c_str();
- tmps = k->Value;
- // replace formal arguments
- for (unsigned int j = 1; j < this->Args.size(); ++j)
+ if(k->Delim == cmListFileArgument::Bracket)
{
- variable = "${";
- variable += this->Args[j];
- variable += "}";
- cmSystemTools::ReplaceString(tmps, variable.c_str(),
- expandedArgs[j-1].c_str());
+ arg.Value = k->Value;
}
- // replace argc
- cmSystemTools::ReplaceString(tmps, "${ARGC}",argcDef.c_str());
-
- // repleace ARGN
- if (tmps.find("${ARGN}") != std::string::npos)
+ else
{
- if (!argnDefInitialized)
+ tmps = k->Value;
+ // replace formal arguments
+ for (unsigned int j = 1; j < this->Args.size(); ++j)
+ {
+ variable = "${";
+ variable += this->Args[j];
+ variable += "}";
+ cmSystemTools::ReplaceString(tmps, variable.c_str(),
+ expandedArgs[j-1].c_str());
+ }
+ // replace argc
+ cmSystemTools::ReplaceString(tmps, "${ARGC}",argcDef.c_str());
+
+ // repleace ARGN
+ if (tmps.find("${ARGN}") != std::string::npos)
{
- std::vector<std::string>::const_iterator eit;
- std::vector<std::string>::size_type cnt = 0;
- for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
+ if (!argnDefInitialized)
{
- if ( cnt >= this->Args.size()-1 )
+ std::vector<std::string>::const_iterator eit;
+ std::vector<std::string>::size_type cnt = 0;
+ for(eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit)
{
- if ( argnDef.size() > 0 )
+ if ( cnt >= this->Args.size()-1 )
{
- argnDef += ";";
+ if ( argnDef.size() > 0 )
+ {
+ argnDef += ";";
+ }
+ argnDef += *eit;
}
- argnDef += *eit;
+ cnt ++;
}
- cnt ++;
+ argnDefInitialized = true;
}
- argnDefInitialized = true;
+ cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str());
}
- cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str());
- }
-
- // if the current argument of the current function has ${ARGV in it
- // then try replacing ARGV values
- if (tmps.find("${ARGV") != std::string::npos)
- {
- char argvName[60];
- // repleace ARGV, compute it only once
- if (!argvDefInitialized)
+ // if the current argument of the current function has ${ARGV in it
+ // then try replacing ARGV values
+ if (tmps.find("${ARGV") != std::string::npos)
{
- std::vector<std::string>::const_iterator eit;
- for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
+ char argvName[60];
+
+ // repleace ARGV, compute it only once
+ if (!argvDefInitialized)
{
- if ( argvDef.size() > 0 )
+ std::vector<std::string>::const_iterator eit;
+ for(eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit)
{
- argvDef += ";";
+ if ( argvDef.size() > 0 )
+ {
+ argvDef += ";";
+ }
+ argvDef += *eit;
}
- argvDef += *eit;
+ argvDefInitialized = true;
}
- argvDefInitialized = true;
- }
- cmSystemTools::ReplaceString(tmps, "${ARGV}", argvDef.c_str());
+ cmSystemTools::ReplaceString(tmps, "${ARGV}", argvDef.c_str());
- // also replace the ARGV1 ARGV2 ... etc
- for (unsigned int t = 0; t < expandedArgs.size(); ++t)
- {
- sprintf(argvName,"${ARGV%i}",t);
- cmSystemTools::ReplaceString(tmps, argvName,
- expandedArgs[t].c_str());
+ // also replace the ARGV1 ARGV2 ... etc
+ for (unsigned int t = 0; t < expandedArgs.size(); ++t)
+ {
+ sprintf(argvName,"${ARGV%i}",t);
+ cmSystemTools::ReplaceString(tmps, argvName,
+ expandedArgs[t].c_str());
+ }
}
- }
- arg.Value = tmps;
+ arg.Value = tmps;
+ }
arg.Delim = k->Delim;
arg.FilePath = k->FilePath;
arg.Line = k->Line;
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 0220825..86beb97 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -273,7 +273,7 @@ bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir)
//----------------------------------------------------------------------------
cmOrderDirectories::cmOrderDirectories(cmGlobalGenerator* gg,
- cmTarget* target,
+ cmTarget const* target,
const char* purpose)
{
this->GlobalGenerator = gg;
diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h
index 96a75de..76bf429 100644
--- a/Source/cmOrderDirectories.h
+++ b/Source/cmOrderDirectories.h
@@ -27,7 +27,7 @@ class cmTarget;
class cmOrderDirectories
{
public:
- cmOrderDirectories(cmGlobalGenerator* gg, cmTarget* target,
+ cmOrderDirectories(cmGlobalGenerator* gg, cmTarget const* target,
const char* purpose);
~cmOrderDirectories();
void AddRuntimeLibrary(std::string const& fullPath, const char* soname = 0);
@@ -41,7 +41,7 @@ public:
std::vector<std::string> const& GetOrderedDirectories();
private:
cmGlobalGenerator* GlobalGenerator;
- cmTarget* Target;
+ cmTarget const* Target;
std::string Purpose;
bool Computed;
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 6d4e281..3aa8e1b 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -34,6 +34,8 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot):
ReplaceDirective("^.. (\\|[^|]+\\|) replace::[ \t]*(.*)$"),
IncludeDirective("^.. include::[ \t]+([^ \t\n]+)$"),
TocTreeDirective("^.. toctree::[ \t]*(.*)$"),
+ ProductionListDirective("^.. productionlist::[ \t]*(.*)$"),
+ NoteDirective("^.. note::[ \t]*(.*)$"),
ModuleRST("^#\\[(=*)\\[\\.rst:$"),
CMakeRole("(:cmake)?:("
"command|generator|variable|module|policy|"
@@ -227,6 +229,16 @@ void cmRST::ProcessLine(std::string const& line)
this->Directive = DirectiveTocTree;
this->MarkupLines.push_back(this->TocTreeDirective.match(1));
}
+ else if(this->ProductionListDirective.find(line))
+ {
+ // Output productionlist directives and their content normally.
+ this->NormalLine(line);
+ }
+ else if(this->NoteDirective.find(line))
+ {
+ // Output note directives and their content normally.
+ this->NormalLine(line);
+ }
}
// An explicit markup start followed nothing but whitespace and a
// blank line does not consume any indented text following.
diff --git a/Source/cmRST.h b/Source/cmRST.h
index fa987cd..3356008 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -84,6 +84,8 @@ private:
cmsys::RegularExpression ReplaceDirective;
cmsys::RegularExpression IncludeDirective;
cmsys::RegularExpression TocTreeDirective;
+ cmsys::RegularExpression ProductionListDirective;
+ cmsys::RegularExpression NoteDirective;
cmsys::RegularExpression ModuleRST;
cmsys::RegularExpression CMakeRole;
cmsys::RegularExpression Substitution;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8320ecf..1ecda88 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1619,18 +1619,23 @@ bool extract_tar(const char* outFileName, bool verbose,
archive_error_string(a));
break;
}
- if (verbose && extract)
+ if(verbose)
{
- cmSystemTools::Stdout("x ");
- cmSystemTools::Stdout(archive_entry_pathname(entry));
- }
- if(verbose && !extract)
- {
- list_item_verbose(stdout, entry);
+ if(extract)
+ {
+ cmSystemTools::Stdout("x ");
+ cmSystemTools::Stdout(archive_entry_pathname(entry));
+ }
+ else
+ {
+ list_item_verbose(stdout, entry);
+ }
+ cmSystemTools::Stdout("\n");
}
else if(!extract)
{
cmSystemTools::Stdout(archive_entry_pathname(entry));
+ cmSystemTools::Stdout("\n");
}
if(extract)
{
@@ -1644,15 +1649,7 @@ bool extract_tar(const char* outFileName, bool verbose,
}
r = archive_write_header(ext, entry);
- if (r != ARCHIVE_OK)
- {
- cmSystemTools::Error("Problem with archive_write_header(): ",
- archive_error_string(ext));
- cmSystemTools::Error("Current file: ",
- archive_entry_pathname(entry));
- break;
- }
- else
+ if (r == ARCHIVE_OK)
{
copy_data(a, ext);
r = archive_write_finish_entry(ext);
@@ -1663,10 +1660,22 @@ bool extract_tar(const char* outFileName, bool verbose,
break;
}
}
- }
- if (verbose || !extract)
- {
- cmSystemTools::Stdout("\n");
+#ifdef _WIN32
+ else if(const char* linktext = archive_entry_symlink(entry))
+ {
+ std::cerr << "cmake -E tar: warning: skipping symbolic link \""
+ << archive_entry_pathname(entry) << "\" -> \""
+ << linktext << "\"." << std::endl;
+ }
+#endif
+ else
+ {
+ cmSystemTools::Error("Problem with archive_write_header(): ",
+ archive_error_string(ext));
+ cmSystemTools::Error("Current file: ",
+ archive_entry_pathname(entry));
+ break;
+ }
}
}
archive_read_close(a);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 92eca0f..70ab947 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -70,9 +70,9 @@ struct cmTarget::ImportInfo
cmTarget::LinkInterface LinkInterface;
};
-struct TargetConfigPair : public std::pair<cmTarget*, std::string> {
- TargetConfigPair(cmTarget* tgt, const std::string &config)
- : std::pair<cmTarget*, std::string>(tgt, config) {}
+struct TargetConfigPair : public std::pair<cmTarget const* , std::string> {
+ TargetConfigPair(cmTarget const* tgt, const std::string &config)
+ : std::pair<cmTarget const* , std::string>(tgt, config) {}
};
//----------------------------------------------------------------------------
@@ -428,7 +428,7 @@ std::string cmTarget::GetSupportDirectory() const
}
//----------------------------------------------------------------------------
-bool cmTarget::IsExecutableWithExports()
+bool cmTarget::IsExecutableWithExports() const
{
return (this->GetType() == cmTarget::EXECUTABLE &&
this->GetPropertyAsBool("ENABLE_EXPORTS"));
@@ -446,7 +446,7 @@ bool cmTarget::IsLinkable()
}
//----------------------------------------------------------------------------
-bool cmTarget::HasImportLibrary()
+bool cmTarget::HasImportLibrary() const
{
return (this->DLLPlatform &&
(this->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -454,7 +454,7 @@ bool cmTarget::HasImportLibrary()
}
//----------------------------------------------------------------------------
-bool cmTarget::IsFrameworkOnApple()
+bool cmTarget::IsFrameworkOnApple() const
{
return (this->GetType() == cmTarget::SHARED_LIBRARY &&
this->Makefile->IsOn("APPLE") &&
@@ -462,7 +462,7 @@ bool cmTarget::IsFrameworkOnApple()
}
//----------------------------------------------------------------------------
-bool cmTarget::IsAppBundleOnApple()
+bool cmTarget::IsAppBundleOnApple() const
{
return (this->GetType() == cmTarget::EXECUTABLE &&
this->Makefile->IsOn("APPLE") &&
@@ -470,7 +470,7 @@ bool cmTarget::IsAppBundleOnApple()
}
//----------------------------------------------------------------------------
-bool cmTarget::IsCFBundleOnApple()
+bool cmTarget::IsCFBundleOnApple() const
{
return (this->GetType() == cmTarget::MODULE_LIBRARY &&
this->Makefile->IsOn("APPLE") &&
@@ -478,7 +478,7 @@ bool cmTarget::IsCFBundleOnApple()
}
//----------------------------------------------------------------------------
-bool cmTarget::IsBundleOnApple()
+bool cmTarget::IsBundleOnApple() const
{
return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() ||
this->IsCFBundleOnApple();
@@ -715,13 +715,13 @@ void cmTarget::AddLinkDirectory(const char* d)
}
//----------------------------------------------------------------------------
-const std::vector<std::string>& cmTarget::GetLinkDirectories()
+const std::vector<std::string>& cmTarget::GetLinkDirectories() const
{
return this->LinkDirectories;
}
//----------------------------------------------------------------------------
-cmTarget::LinkLibraryType cmTarget::ComputeLinkType(const char* config)
+cmTarget::LinkLibraryType cmTarget::ComputeLinkType(const char* config) const
{
// No configuration is always optimized.
if(!(config && *config))
@@ -785,7 +785,8 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname)
//----------------------------------------------------------------------------
void cmTarget::GetDirectLinkLibraries(const char *config,
- std::vector<std::string> &libs, cmTarget *head)
+ std::vector<std::string> &libs,
+ cmTarget const* head) const
{
const char *prop = this->GetProperty("LINK_LIBRARIES");
if (prop)
@@ -1512,7 +1513,7 @@ void cmTarget::AppendProperty(const char* prop, const char* value,
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetExportName()
+const char* cmTarget::GetExportName() const
{
const char *exportName = this->GetProperty("EXPORT_NAME");
@@ -2322,7 +2323,7 @@ void cmTarget::MarkAsImported()
}
//----------------------------------------------------------------------------
-bool cmTarget::HaveWellDefinedOutputFiles()
+bool cmTarget::HaveWellDefinedOutputFiles() const
{
return
this->GetType() == cmTarget::STATIC_LIBRARY ||
@@ -2332,7 +2333,7 @@ bool cmTarget::HaveWellDefinedOutputFiles()
}
//----------------------------------------------------------------------------
-cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
+cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config) const
{
// There is no output information for imported targets.
if(this->IsImported())
@@ -2377,7 +2378,7 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetDirectory(const char* config, bool implib)
+std::string cmTarget::GetDirectory(const char* config, bool implib) const
{
if (this->IsImported())
{
@@ -2406,7 +2407,7 @@ std::string cmTarget::GetPDBDirectory(const char* config)
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetLocation(const char* config)
+const char* cmTarget::GetLocation(const char* config) const
{
if (this->IsImported())
{
@@ -2419,7 +2420,7 @@ const char* cmTarget::GetLocation(const char* config)
}
//----------------------------------------------------------------------------
-const char* cmTarget::ImportedGetLocation(const char* config)
+const char* cmTarget::ImportedGetLocation(const char* config) const
{
static std::string location;
location = this->ImportedGetFullPath(config, false);
@@ -2427,7 +2428,7 @@ const char* cmTarget::ImportedGetLocation(const char* config)
}
//----------------------------------------------------------------------------
-const char* cmTarget::NormalGetLocation(const char* config)
+const char* cmTarget::NormalGetLocation(const char* config) const
{
static std::string location;
// Handle the configuration-specific case first.
@@ -2522,13 +2523,13 @@ const char* cmTarget::GetFeature(const char* feature, const char* config)
}
//----------------------------------------------------------------------------
-const char *cmTarget::GetProperty(const char* prop)
+const char *cmTarget::GetProperty(const char* prop) const
{
return this->GetProperty(prop, cmProperty::TARGET);
}
//----------------------------------------------------------------------------
-bool cmTarget::HandleLocationPropertyPolicy()
+bool cmTarget::HandleLocationPropertyPolicy() const
{
if (this->IsImported())
{
@@ -2566,7 +2567,7 @@ bool cmTarget::HandleLocationPropertyPolicy()
//----------------------------------------------------------------------------
const char *cmTarget::GetProperty(const char* prop,
- cmProperty::ScopeType scope)
+ cmProperty::ScopeType scope) const
{
if(!prop)
{
@@ -2603,7 +2604,8 @@ const char *cmTarget::GetProperty(const char* prop,
// cannot take into account the per-configuration name of the
// target because the configuration type may not be known at
// CMake time.
- this->SetProperty("LOCATION", this->GetLocation(0));
+ this->Properties.SetProperty("LOCATION", this->GetLocation(0),
+ cmProperty::TARGET);
}
// Support "LOCATION_<CONFIG>".
@@ -2614,7 +2616,9 @@ const char *cmTarget::GetProperty(const char* prop,
return 0;
}
std::string configName = prop+9;
- this->SetProperty(prop, this->GetLocation(configName.c_str()));
+ this->Properties.SetProperty(prop,
+ this->GetLocation(configName.c_str()),
+ cmProperty::TARGET);
}
else
{
@@ -2629,7 +2633,9 @@ const char *cmTarget::GetProperty(const char* prop,
{
return 0;
}
- this->SetProperty(prop, this->GetLocation(configName.c_str()));
+ this->Properties.SetProperty(prop,
+ this->GetLocation(configName.c_str()),
+ cmProperty::TARGET);
}
}
}
@@ -2734,7 +2740,8 @@ const char *cmTarget::GetProperty(const char* prop,
// Append this list entry.
ss << sname;
}
- this->SetProperty("SOURCES", ss.str().c_str());
+ this->Properties.SetProperty("SOURCES", ss.str().c_str(),
+ cmProperty::TARGET);
}
// the type property returns what type the target is
@@ -2753,7 +2760,7 @@ const char *cmTarget::GetProperty(const char* prop,
}
//----------------------------------------------------------------------------
-bool cmTarget::GetPropertyAsBool(const char* prop)
+bool cmTarget::GetPropertyAsBool(const char* prop) const
{
return cmSystemTools::IsOn(this->GetProperty(prop));
}
@@ -2762,13 +2769,13 @@ bool cmTarget::GetPropertyAsBool(const char* prop)
class cmTargetCollectLinkLanguages
{
public:
- cmTargetCollectLinkLanguages(cmTarget* target, const char* config,
+ cmTargetCollectLinkLanguages(cmTarget const* target, const char* config,
std::set<cmStdString>& languages,
- cmTarget* head):
+ cmTarget const* head):
Config(config), Languages(languages), HeadTarget(head)
{ this->Visited.insert(target); }
- void Visit(cmTarget* target)
+ void Visit(cmTarget const* target)
{
if(!target || !this->Visited.insert(target).second)
{
@@ -2795,14 +2802,15 @@ public:
private:
const char* Config;
std::set<cmStdString>& Languages;
- cmTarget* HeadTarget;
- std::set<cmTarget*> Visited;
+ cmTarget const* HeadTarget;
+ std::set<cmTarget const*> Visited;
};
//----------------------------------------------------------------------------
-const char* cmTarget::GetLinkerLanguage(const char* config, cmTarget *head)
+const char* cmTarget::GetLinkerLanguage(const char* config,
+ cmTarget const* head) const
{
- cmTarget *headTarget = head ? head : this;
+ cmTarget const* headTarget = head ? head : this;
const char* lang = this->GetLinkClosure(config, headTarget)
->LinkerLanguage.c_str();
return *lang? lang : 0;
@@ -2810,7 +2818,7 @@ const char* cmTarget::GetLinkerLanguage(const char* config, cmTarget *head)
//----------------------------------------------------------------------------
cmTarget::LinkClosure const* cmTarget::GetLinkClosure(const char* config,
- cmTarget *head)
+ cmTarget const* head) const
{
TargetConfigPair key(head, cmSystemTools::UpperCase(config ? config : ""));
cmTargetInternals::LinkClosureMapType::iterator
@@ -2829,12 +2837,12 @@ cmTarget::LinkClosure const* cmTarget::GetLinkClosure(const char* config,
class cmTargetSelectLinker
{
int Preference;
- cmTarget* Target;
+ cmTarget const* Target;
cmMakefile* Makefile;
cmGlobalGenerator* GG;
std::set<cmStdString> Preferred;
public:
- cmTargetSelectLinker(cmTarget* target): Preference(0), Target(target)
+ cmTargetSelectLinker(cmTarget const* target): Preference(0), Target(target)
{
this->Makefile = this->Target->GetMakefile();
this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
@@ -2880,7 +2888,7 @@ public:
//----------------------------------------------------------------------------
void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc,
- cmTarget *head)
+ cmTarget const* head) const
{
// Get languages built in this target.
std::set<cmStdString> languages;
@@ -2943,7 +2951,7 @@ void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc,
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetSuffixVariableInternal(bool implib)
+const char* cmTarget::GetSuffixVariableInternal(bool implib) const
{
switch(this->GetType())
{
@@ -2969,7 +2977,7 @@ const char* cmTarget::GetSuffixVariableInternal(bool implib)
//----------------------------------------------------------------------------
-const char* cmTarget::GetPrefixVariableInternal(bool implib)
+const char* cmTarget::GetPrefixVariableInternal(bool implib) const
{
switch(this->GetType())
{
@@ -2992,7 +3000,7 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetPDBName(const char* config)
+std::string cmTarget::GetPDBName(const char* config) const
{
std::string prefix;
std::string base;
@@ -3024,7 +3032,7 @@ std::string cmTarget::GetPDBName(const char* config)
}
//----------------------------------------------------------------------------
-bool cmTarget::HasSOName(const char* config)
+bool cmTarget::HasSOName(const char* config) const
{
// soname is supported only for shared libraries and modules,
// and then only when the platform supports an soname flag.
@@ -3036,7 +3044,7 @@ bool cmTarget::HasSOName(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetSOName(const char* config)
+std::string cmTarget::GetSOName(const char* config) const
{
if(this->IsImported())
{
@@ -3164,7 +3172,7 @@ bool cmTarget::IsImportedSharedLibWithoutSOName(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::NormalGetRealName(const char* config)
+std::string cmTarget::NormalGetRealName(const char* config) const
{
// This should not be called for imported targets.
// TODO: Split cmTarget into a class hierarchy to get compile-time
@@ -3202,7 +3210,7 @@ std::string cmTarget::NormalGetRealName(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetFullName(const char* config, bool implib)
+std::string cmTarget::GetFullName(const char* config, bool implib) const
{
if(this->IsImported())
{
@@ -3215,7 +3223,8 @@ std::string cmTarget::GetFullName(const char* config, bool implib)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetFullNameImported(const char* config, bool implib)
+std::string
+cmTarget::GetFullNameImported(const char* config, bool implib) const
{
return cmSystemTools::GetFilenameName(
this->ImportedGetFullPath(config, implib));
@@ -3231,7 +3240,7 @@ void cmTarget::GetFullNameComponents(std::string& prefix, std::string& base,
//----------------------------------------------------------------------------
std::string cmTarget::GetFullPath(const char* config, bool implib,
- bool realname)
+ bool realname) const
{
if(this->IsImported())
{
@@ -3245,7 +3254,7 @@ std::string cmTarget::GetFullPath(const char* config, bool implib,
//----------------------------------------------------------------------------
std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
- bool realname)
+ bool realname) const
{
std::string fpath = this->GetDirectory(config, implib);
fpath += "/";
@@ -3272,7 +3281,8 @@ std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
}
//----------------------------------------------------------------------------
-std::string cmTarget::ImportedGetFullPath(const char* config, bool implib)
+std::string
+cmTarget::ImportedGetFullPath(const char* config, bool implib) const
{
std::string result;
if(cmTarget::ImportInfo const* info = this->GetImportInfo(config, this))
@@ -3288,7 +3298,8 @@ std::string cmTarget::ImportedGetFullPath(const char* config, bool implib)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetFullNameInternal(const char* config, bool implib)
+std::string
+cmTarget::GetFullNameInternal(const char* config, bool implib) const
{
std::string prefix;
std::string base;
@@ -3302,7 +3313,7 @@ void cmTarget::GetFullNameInternal(const char* config,
bool implib,
std::string& outPrefix,
std::string& outBase,
- std::string& outSuffix)
+ std::string& outSuffix) const
{
// Use just the target name for non-main target types.
if(this->GetType() != cmTarget::STATIC_LIBRARY &&
@@ -3440,7 +3451,7 @@ void cmTarget::GetLibraryNames(std::string& name,
std::string& realName,
std::string& impName,
std::string& pdbName,
- const char* config)
+ const char* config) const
{
// This should not be called for imported targets.
// TODO: Split cmTarget into a class hierarchy to get compile-time
@@ -3526,7 +3537,7 @@ void cmTarget::ComputeVersionedName(std::string& vName,
std::string const& base,
std::string const& suffix,
std::string const& name,
- const char* version)
+ const char* version) const
{
vName = this->IsApple? (prefix+base) : name;
if(version)
@@ -3542,7 +3553,7 @@ void cmTarget::GetExecutableNames(std::string& name,
std::string& realName,
std::string& impName,
std::string& pdbName,
- const char* config)
+ const char* config) const
{
// This should not be called for imported targets.
// TODO: Split cmTarget into a class hierarchy to get compile-time
@@ -3638,7 +3649,7 @@ void cmTarget::SetPropertyDefault(const char* property,
}
//----------------------------------------------------------------------------
-bool cmTarget::HaveBuildTreeRPATH(const char *config)
+bool cmTarget::HaveBuildTreeRPATH(const char *config) const
{
if (this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
{
@@ -3650,7 +3661,7 @@ bool cmTarget::HaveBuildTreeRPATH(const char *config)
}
//----------------------------------------------------------------------------
-bool cmTarget::HaveInstallTreeRPATH()
+bool cmTarget::HaveInstallTreeRPATH() const
{
const char* install_rpath = this->GetProperty("INSTALL_RPATH");
return (install_rpath && *install_rpath) &&
@@ -3783,7 +3794,7 @@ std::string cmTarget::GetInstallNameDirForInstallTree()
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetOutputTargetType(bool implib)
+const char* cmTarget::GetOutputTargetType(bool implib) const
{
switch(this->GetType())
{
@@ -3840,7 +3851,7 @@ const char* cmTarget::GetOutputTargetType(bool implib)
//----------------------------------------------------------------------------
bool cmTarget::ComputeOutputDir(const char* config,
- bool implib, std::string& out)
+ bool implib, std::string& out) const
{
bool usesDefaultOutputDir = false;
@@ -3920,7 +3931,7 @@ bool cmTarget::ComputeOutputDir(const char* config,
}
//----------------------------------------------------------------------------
-bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out)
+bool cmTarget::ComputePDBOutputDir(const char* config, std::string& out) const
{
// Look for a target property defining the target output directory
// based on the target type.
@@ -3986,7 +3997,7 @@ bool cmTarget::UsesDefaultOutputDir(const char* config, bool implib)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetOutputName(const char* config, bool implib)
+std::string cmTarget::GetOutputName(const char* config, bool implib) const
{
std::vector<std::string> props;
std::string type = this->GetOutputTargetType(implib);
@@ -4023,7 +4034,7 @@ std::string cmTarget::GetOutputName(const char* config, bool implib)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetFrameworkVersion()
+std::string cmTarget::GetFrameworkVersion() const
{
if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
{
@@ -4066,7 +4077,7 @@ const char* cmTarget::GetExportMacro()
}
//----------------------------------------------------------------------------
-bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
+bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p) const
{
return this->LinkImplicitNullProperties.find(p)
!= this->LinkImplicitNullProperties.end();
@@ -4074,20 +4085,21 @@ bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
//----------------------------------------------------------------------------
template<typename PropertyType>
-PropertyType getTypedProperty(cmTarget *tgt, const char *prop,
+PropertyType getTypedProperty(cmTarget const* tgt, const char *prop,
PropertyType *);
//----------------------------------------------------------------------------
template<>
-bool getTypedProperty<bool>(cmTarget *tgt, const char *prop, bool *)
+bool getTypedProperty<bool>(cmTarget const* tgt, const char *prop, bool *)
{
return tgt->GetPropertyAsBool(prop);
}
//----------------------------------------------------------------------------
template<>
-const char *getTypedProperty<const char *>(cmTarget *tgt, const char *prop,
- const char **)
+const char *getTypedProperty<const char *>(cmTarget const* tgt,
+ const char *prop,
+ const char **)
{
return tgt->GetProperty(prop);
}
@@ -4197,7 +4209,7 @@ const char* impliedValue<const char*>(const char*)
//----------------------------------------------------------------------------
template<typename PropertyType>
-PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
+PropertyType checkInterfacePropertyCompatibility(cmTarget const* tgt,
const std::string &p,
const char *config,
const char *defaultValue,
@@ -4346,7 +4358,7 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
//----------------------------------------------------------------------------
bool cmTarget::GetLinkInterfaceDependentBoolProperty(const std::string &p,
- const char *config)
+ const char *config) const
{
return checkInterfacePropertyCompatibility<bool>(this, p, config, "FALSE",
BoolType, 0);
@@ -4355,7 +4367,7 @@ bool cmTarget::GetLinkInterfaceDependentBoolProperty(const std::string &p,
//----------------------------------------------------------------------------
const char * cmTarget::GetLinkInterfaceDependentStringProperty(
const std::string &p,
- const char *config)
+ const char *config) const
{
return checkInterfacePropertyCompatibility<const char *>(this,
p,
@@ -4367,7 +4379,7 @@ const char * cmTarget::GetLinkInterfaceDependentStringProperty(
//----------------------------------------------------------------------------
const char * cmTarget::GetLinkInterfaceDependentNumberMinProperty(
const std::string &p,
- const char *config)
+ const char *config) const
{
return checkInterfacePropertyCompatibility<const char *>(this,
p,
@@ -4379,7 +4391,7 @@ const char * cmTarget::GetLinkInterfaceDependentNumberMinProperty(
//----------------------------------------------------------------------------
const char * cmTarget::GetLinkInterfaceDependentNumberMaxProperty(
const std::string &p,
- const char *config)
+ const char *config) const
{
return checkInterfacePropertyCompatibility<const char *>(this,
p,
@@ -4389,7 +4401,7 @@ const char * cmTarget::GetLinkInterfaceDependentNumberMaxProperty(
}
//----------------------------------------------------------------------------
-bool isLinkDependentProperty(cmTarget *tgt, const std::string &p,
+bool isLinkDependentProperty(cmTarget const* tgt, const std::string &p,
const char *interfaceProperty,
const char *config)
{
@@ -4433,7 +4445,7 @@ bool isLinkDependentProperty(cmTarget *tgt, const std::string &p,
//----------------------------------------------------------------------------
bool cmTarget::IsLinkInterfaceDependentBoolProperty(const std::string &p,
- const char *config)
+ const char *config) const
{
if (this->TargetTypeValue == OBJECT_LIBRARY)
{
@@ -4446,7 +4458,7 @@ bool cmTarget::IsLinkInterfaceDependentBoolProperty(const std::string &p,
//----------------------------------------------------------------------------
bool cmTarget::IsLinkInterfaceDependentStringProperty(const std::string &p,
- const char *config)
+ const char *config) const
{
if (this->TargetTypeValue == OBJECT_LIBRARY)
{
@@ -4458,7 +4470,7 @@ bool cmTarget::IsLinkInterfaceDependentStringProperty(const std::string &p,
//----------------------------------------------------------------------------
bool cmTarget::IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
- const char *config)
+ const char *config) const
{
if (this->TargetTypeValue == OBJECT_LIBRARY)
{
@@ -4470,7 +4482,7 @@ bool cmTarget::IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
//----------------------------------------------------------------------------
bool cmTarget::IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
- const char *config)
+ const char *config) const
{
if (this->TargetTypeValue == OBJECT_LIBRARY)
{
@@ -4494,7 +4506,7 @@ void cmTarget::GetLanguages(std::set<cmStdString>& languages) const
}
//----------------------------------------------------------------------------
-bool cmTarget::IsChrpathUsed(const char* config)
+bool cmTarget::IsChrpathUsed(const char* config) const
{
// Only certain target types have an rpath.
if(!(this->GetType() == cmTarget::SHARED_LIBRARY ||
@@ -4561,7 +4573,7 @@ bool cmTarget::IsChrpathUsed(const char* config)
//----------------------------------------------------------------------------
cmTarget::ImportInfo const*
-cmTarget::GetImportInfo(const char* config, cmTarget *headTarget)
+cmTarget::GetImportInfo(const char* config, cmTarget const* headTarget) const
{
// There is no imported information for non-imported targets.
if(!this->IsImported())
@@ -4611,7 +4623,7 @@ cmTarget::GetImportInfo(const char* config, cmTarget *headTarget)
bool cmTarget::GetMappedConfig(std::string const& desired_config,
const char** loc,
const char** imp,
- std::string& suffix)
+ std::string& suffix) const
{
// Track the configuration-specific property suffix.
suffix = "_";
@@ -4733,7 +4745,7 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config,
//----------------------------------------------------------------------------
void cmTarget::ComputeImportInfo(std::string const& desired_config,
ImportInfo& info,
- cmTarget *headTarget)
+ cmTarget const* headTarget) const
{
// This method finds information about an imported target from its
// properties. The "IMPORTED_" namespace is reserved for properties
@@ -4919,7 +4931,7 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
//----------------------------------------------------------------------------
cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config,
- cmTarget *head)
+ cmTarget const* head) const
{
// Imported targets have their own link interface.
if(this->IsImported())
@@ -4961,8 +4973,8 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config,
//----------------------------------------------------------------------------
void cmTarget::GetTransitivePropertyLinkLibraries(
const char* config,
- cmTarget *headTarget,
- std::vector<std::string> &libs)
+ cmTarget const* headTarget,
+ std::vector<std::string> &libs) const
{
cmTarget::LinkInterface const* iface = this->GetLinkInterface(config,
headTarget);
@@ -5002,7 +5014,7 @@ void cmTarget::GetTransitivePropertyLinkLibraries(
//----------------------------------------------------------------------------
bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
- cmTarget *headTarget)
+ cmTarget const* headTarget) const
{
// Construct the property name suffix for this configuration.
std::string suffix = "_";
@@ -5264,7 +5276,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
//----------------------------------------------------------------------------
cmTarget::LinkImplementation const*
-cmTarget::GetLinkImplementation(const char* config, cmTarget *head)
+cmTarget::GetLinkImplementation(const char* config, cmTarget const* head) const
{
// There is no link implementation for imported targets.
if(this->IsImported())
@@ -5294,7 +5306,7 @@ cmTarget::GetLinkImplementation(const char* config, cmTarget *head)
//----------------------------------------------------------------------------
void cmTarget::ComputeLinkImplementation(const char* config,
LinkImplementation& impl,
- cmTarget *head)
+ cmTarget const* head) const
{
// Compute which library configuration to link.
cmTarget::LinkLibraryType linkType = this->ComputeLinkType(config);
@@ -5376,7 +5388,8 @@ void cmTarget::ComputeLinkImplementation(const char* config,
// Get languages used in our source files.
this->GetLanguages(languages);
// Get languages used in object library sources.
- for(std::vector<std::string>::iterator i = this->ObjectLibraries.begin();
+ for(std::vector<std::string>::const_iterator
+ i = this->ObjectLibraries.begin();
i != this->ObjectLibraries.end(); ++i)
{
if(cmTarget* objLib = this->Makefile->FindTargetToUse(i->c_str()))
@@ -5396,7 +5409,7 @@ void cmTarget::ComputeLinkImplementation(const char* config,
}
//----------------------------------------------------------------------------
-std::string cmTarget::CheckCMP0004(std::string const& item)
+std::string cmTarget::CheckCMP0004(std::string const& item) const
{
// Strip whitespace off the library names because we used to do this
// in case variables were expanded at generate time. We no longer
@@ -5455,14 +5468,14 @@ std::string cmTarget::CheckCMP0004(std::string const& item)
}
template<typename PropertyType>
-PropertyType getLinkInterfaceDependentProperty(cmTarget *tgt,
+PropertyType getLinkInterfaceDependentProperty(cmTarget const* tgt,
const std::string prop,
const char *config,
CompatibleType,
PropertyType *);
template<>
-bool getLinkInterfaceDependentProperty(cmTarget *tgt,
+bool getLinkInterfaceDependentProperty(cmTarget const* tgt,
const std::string prop,
const char *config,
CompatibleType, bool *)
@@ -5471,7 +5484,7 @@ bool getLinkInterfaceDependentProperty(cmTarget *tgt,
}
template<>
-const char * getLinkInterfaceDependentProperty(cmTarget *tgt,
+const char * getLinkInterfaceDependentProperty(cmTarget const* tgt,
const std::string prop,
const char *config,
CompatibleType t,
@@ -5495,7 +5508,7 @@ const char * getLinkInterfaceDependentProperty(cmTarget *tgt,
//----------------------------------------------------------------------------
template<typename PropertyType>
-void checkPropertyConsistency(cmTarget *depender, cmTarget *dependee,
+void checkPropertyConsistency(cmTarget const* depender, cmTarget *dependee,
const char *propName,
std::set<cmStdString> &emitted,
const char *config,
@@ -5587,7 +5600,7 @@ static cmStdString intersect(const std::set<cmStdString> &s1,
//----------------------------------------------------------------------------
void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
- const char* config)
+ const char* config) const
{
const cmComputeLinkInformation::ItemVector &deps = info->GetItems();
@@ -5690,9 +5703,9 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info,
//----------------------------------------------------------------------------
cmComputeLinkInformation*
-cmTarget::GetLinkInformation(const char* config, cmTarget *head)
+cmTarget::GetLinkInformation(const char* config, cmTarget const* head) const
{
- cmTarget *headTarget = head ? head : this;
+ cmTarget const* headTarget = head ? head : this;
// Lookup any existing information for this configuration.
TargetConfigPair key(headTarget,
cmSystemTools::UpperCase(config?config:""));
@@ -5723,7 +5736,7 @@ cmTarget::GetLinkInformation(const char* config, cmTarget *head)
//----------------------------------------------------------------------------
std::string cmTarget::GetFrameworkDirectory(const char* config,
- bool rootDir)
+ bool rootDir) const
{
std::string fpath;
fpath += this->GetOutputName(config, false);
@@ -5738,7 +5751,7 @@ std::string cmTarget::GetFrameworkDirectory(const char* config,
//----------------------------------------------------------------------------
std::string cmTarget::GetCFBundleDirectory(const char* config,
- bool contentOnly)
+ bool contentOnly) const
{
std::string fpath;
fpath += this->GetOutputName(config, false);
@@ -5757,7 +5770,7 @@ std::string cmTarget::GetCFBundleDirectory(const char* config,
//----------------------------------------------------------------------------
std::string cmTarget::GetAppBundleDirectory(const char* config,
- bool contentOnly)
+ bool contentOnly) const
{
std::string fpath = this->GetFullName(config, false);
fpath += ".app/Contents";
@@ -5769,7 +5782,7 @@ std::string cmTarget::GetAppBundleDirectory(const char* config,
//----------------------------------------------------------------------------
std::string cmTarget::BuildMacContentDirectory(const std::string& base,
const char* config,
- bool contentOnly)
+ bool contentOnly) const
{
std::string fpath = base;
if(this->IsAppBundleOnApple())
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index f3b60b0..eae5009 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -38,9 +38,10 @@ class cmGeneratorTarget;
class cmTargetTraceDependencies;
struct cmTargetLinkInformationMap:
- public std::map<std::pair<cmTarget*, std::string>, cmComputeLinkInformation*>
+ public std::map<std::pair<cmTarget const* , std::string>,
+ cmComputeLinkInformation*>
{
- typedef std::map<std::pair<cmTarget*, std::string>,
+ typedef std::map<std::pair<cmTarget const* , std::string>,
cmComputeLinkInformation*> derived;
cmTargetLinkInformationMap() {}
cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r);
@@ -96,7 +97,7 @@ public:
///! Set/Get the name of the target
const char* GetName() const {return this->Name.c_str();}
- const char* GetExportName();
+ const char* GetExportName() const;
///! Set the cmMakefile that owns this target
void SetMakefile(cmMakefile *mf);
@@ -175,13 +176,13 @@ public:
{return this->OriginalLinkLibraries;}
void GetDirectLinkLibraries(const char *config,
std::vector<std::string> &,
- cmTarget *head);
+ cmTarget const* head) const;
void GetInterfaceLinkLibraries(const char *config,
std::vector<std::string> &,
cmTarget *head);
/** Compute the link type to use for the given configuration. */
- LinkLibraryType ComputeLinkType(const char* config);
+ LinkLibraryType ComputeLinkType(const char* config) const;
/**
* Clear the dependency information recorded for this target, if any.
@@ -203,7 +204,7 @@ public:
void MergeLinkLibraries( cmMakefile& mf, const char* selfname,
const LinkLibraryVectorType& libs );
- const std::vector<std::string>& GetLinkDirectories();
+ const std::vector<std::string>& GetLinkDirectories() const;
void AddLinkDirectory(const char* d);
@@ -225,7 +226,7 @@ public:
/**
* Get/Set whether there is an install rule for this target.
*/
- bool GetHaveInstallRule() { return this->HaveInstallRule; }
+ bool GetHaveInstallRule() const { return this->HaveInstallRule; }
void SetHaveInstallRule(bool h) { this->HaveInstallRule = h; }
/** Add a utility on which this project depends. A utility is an executable
@@ -242,9 +243,9 @@ public:
///! Set/Get a property of this target file
void SetProperty(const char *prop, const char *value);
void AppendProperty(const char* prop, const char* value,bool asString=false);
- const char *GetProperty(const char *prop);
- const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
- bool GetPropertyAsBool(const char *prop);
+ const char *GetProperty(const char *prop) const;
+ const char *GetProperty(const char *prop, cmProperty::ScopeType scope) const;
+ bool GetPropertyAsBool(const char *prop) const;
void CheckProperty(const char* prop, cmMakefile* context);
const char* GetFeature(const char* feature, const char* config);
@@ -280,10 +281,10 @@ public:
/** Get the link interface for the given configuration. Returns 0
if the target cannot be linked. */
LinkInterface const* GetLinkInterface(const char* config,
- cmTarget *headTarget);
+ cmTarget const* headTarget) const;
void GetTransitivePropertyLinkLibraries(const char* config,
- cmTarget *headTarget,
- std::vector<std::string> &libs);
+ cmTarget const* headTarget,
+ std::vector<std::string> &libs) const;
/** The link implementation specifies the direct library
dependencies needed by the object files of the target. */
@@ -300,7 +301,7 @@ public:
std::vector<std::string> WrongConfigLibraries;
};
LinkImplementation const* GetLinkImplementation(const char* config,
- cmTarget *head);
+ cmTarget const* head) const;
/** Link information from the transitive closure of the link
implementation and the interfaces of its dependencies. */
@@ -312,17 +313,18 @@ public:
// Languages whose runtime libraries must be linked.
std::vector<std::string> Languages;
};
- LinkClosure const* GetLinkClosure(const char* config, cmTarget *head);
+ LinkClosure const* GetLinkClosure(const char* config,
+ cmTarget const* head) const;
/** Strip off leading and trailing whitespace from an item named in
the link dependencies of this target. */
- std::string CheckCMP0004(std::string const& item);
+ std::string CheckCMP0004(std::string const& item) const;
/** Get the directory in which this target will be built. If the
configuration name is given then the generator will add its
subdirectory for that configuration. Otherwise just the canonical
output directory is given. */
- std::string GetDirectory(const char* config = 0, bool implib = false);
+ std::string GetDirectory(const char* config = 0, bool implib = false) const;
/** Get the directory in which this targets .pdb files will be placed.
If the configuration name is given then the generator will add its
@@ -333,7 +335,7 @@ public:
/** Get the location of the target in the build tree for the given
configuration. This location is suitable for use as the LOCATION
target property. */
- const char* GetLocation(const char* config);
+ const char* GetLocation(const char* config) const;
/** Get the target major and minor version numbers interpreted from
the VERSION property. Version 0 is returned if the property is
@@ -351,23 +353,24 @@ public:
bool FindSourceFiles();
///! Return the preferred linker language for this target
- const char* GetLinkerLanguage(const char* config = 0, cmTarget *head = 0);
+ const char* GetLinkerLanguage(const char* config = 0,
+ cmTarget const* head = 0) const;
/** Get the full name of the target according to the settings in its
makefile. */
- std::string GetFullName(const char* config=0, bool implib = false);
+ std::string GetFullName(const char* config=0, bool implib = false) const;
void GetFullNameComponents(std::string& prefix,
std::string& base, std::string& suffix,
const char* config=0, bool implib = false);
/** Get the name of the pdb file for the target. */
- std::string GetPDBName(const char* config=0);
+ std::string GetPDBName(const char* config=0) const;
/** Whether this library has soname enabled and platform supports it. */
- bool HasSOName(const char* config);
+ bool HasSOName(const char* config) const;
/** Get the soname of the target. Allowed only for a shared library. */
- std::string GetSOName(const char* config);
+ std::string GetSOName(const char* config) const;
/** Whether this library has \@rpath and platform supports it. */
bool HasMacOSXRpath(const char* config);
@@ -379,21 +382,21 @@ public:
/** Get the full path to the target according to the settings in its
makefile and the configuration type. */
std::string GetFullPath(const char* config=0, bool implib = false,
- bool realname = false);
+ bool realname = false) const;
/** Get the names of the library needed to generate a build rule
that takes into account shared library version numbers. This
should be called only on a library target. */
void GetLibraryNames(std::string& name, std::string& soName,
std::string& realName, std::string& impName,
- std::string& pdbName, const char* config);
+ std::string& pdbName, const char* config) const;
/** Get the names of the executable needed to generate a build rule
that takes into account executable version numbers. This should
be called only on an executable target. */
void GetExecutableNames(std::string& name, std::string& realName,
std::string& impName,
- std::string& pdbName, const char* config);
+ std::string& pdbName, const char* config) const;
/** Does this target have a GNU implib to convert to MS format? */
bool HasImplibGNUtoMS();
@@ -408,11 +411,11 @@ public:
*/
bool NeedRelinkBeforeInstall(const char* config);
- bool HaveBuildTreeRPATH(const char *config);
- bool HaveInstallTreeRPATH();
+ bool HaveBuildTreeRPATH(const char *config) const;
+ bool HaveInstallTreeRPATH() const;
/** Return true if builtin chrpath will work for this target */
- bool IsChrpathUsed(const char* config);
+ bool IsChrpathUsed(const char* config) const;
/** Return the install name directory for the target in the
* build tree. For example: "\@rpath/", "\@loader_path/",
@@ -424,15 +427,15 @@ public:
std::string GetInstallNameDirForInstallTree();
cmComputeLinkInformation* GetLinkInformation(const char* config,
- cmTarget *head = 0);
+ cmTarget const* head = 0) const;
// Get the properties
- cmPropertyMap &GetProperties() { return this->Properties; };
+ cmPropertyMap &GetProperties() const { return this->Properties; };
bool GetMappedConfig(std::string const& desired_config,
const char** loc,
const char** imp,
- std::string& suffix);
+ std::string& suffix) const;
// Define the properties
static void DefineProperties(cmake *cm);
@@ -453,7 +456,7 @@ public:
/** Return whether this target is an executable with symbol exports
enabled. */
- bool IsExecutableWithExports();
+ bool IsExecutableWithExports() const;
/** Return whether this target may be used to link another target. */
bool IsLinkable();
@@ -462,25 +465,25 @@ public:
bool IsDLLPlatform() { return this->DLLPlatform; }
/** Return whether or not the target has a DLL import library. */
- bool HasImportLibrary();
+ bool HasImportLibrary() const;
/** Return whether this target is a shared library Framework on
Apple. */
- bool IsFrameworkOnApple();
+ bool IsFrameworkOnApple() const;
/** Return whether this target is a CFBundle (plugin) on Apple. */
- bool IsCFBundleOnApple();
+ bool IsCFBundleOnApple() const;
/** Return whether this target is an executable Bundle on Apple. */
- bool IsAppBundleOnApple();
+ bool IsAppBundleOnApple() const;
/** Return whether this target is an executable Bundle, a framework
or CFBundle on Apple. */
- bool IsBundleOnApple();
+ bool IsBundleOnApple() const;
/** Return the framework version string. Undefined if
IsFrameworkOnApple returns false. */
- std::string GetFrameworkVersion();
+ std::string GetFrameworkVersion() const;
/** Get a backtrace from the creation of the target. */
cmListFileBacktrace const& GetBacktrace() const;
@@ -497,16 +500,17 @@ public:
bool implib);
/** @return whether this target have a well defined output file name. */
- bool HaveWellDefinedOutputFiles();
+ bool HaveWellDefinedOutputFiles() const;
/** @return the Mac framework directory without the base. */
- std::string GetFrameworkDirectory(const char* config, bool rootDir);
+ std::string GetFrameworkDirectory(const char* config, bool rootDir) const;
/** @return the Mac CFBundle directory without the base */
- std::string GetCFBundleDirectory(const char* config, bool contentOnly);
+ std::string GetCFBundleDirectory(const char* config, bool contentOnly) const;
/** @return the Mac App directory without the base */
- std::string GetAppBundleDirectory(const char* config, bool contentOnly);
+ std::string GetAppBundleDirectory(const char* config,
+ bool contentOnly) const;
std::vector<std::string> GetIncludeDirectories(const char *config);
void InsertInclude(const cmValueWithOrigin &entry,
@@ -521,25 +525,25 @@ public:
void GetCompileOptions(std::vector<std::string> &result,
const char *config);
- bool IsNullImpliedByLinkLibraries(const std::string &p);
+ bool IsNullImpliedByLinkLibraries(const std::string &p) const;
bool IsLinkInterfaceDependentBoolProperty(const std::string &p,
- const char *config);
+ const char *config) const;
bool IsLinkInterfaceDependentStringProperty(const std::string &p,
- const char *config);
+ const char *config) const;
bool IsLinkInterfaceDependentNumberMinProperty(const std::string &p,
- const char *config);
+ const char *config) const;
bool IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
- const char *config);
+ const char *config) const;
bool GetLinkInterfaceDependentBoolProperty(const std::string &p,
- const char *config);
+ const char *config) const;
const char *GetLinkInterfaceDependentStringProperty(const std::string &p,
- const char *config);
+ const char *config) const;
const char *GetLinkInterfaceDependentNumberMinProperty(const std::string &p,
- const char *config);
+ const char *config) const;
const char *GetLinkInterfaceDependentNumberMaxProperty(const std::string &p,
- const char *config);
+ const char *config) const;
std::string GetDebugGeneratorExpressions(const std::string &value,
cmTarget::LinkLibraryType llt);
@@ -555,7 +559,7 @@ public:
{ return this->TargetTypeValue == STATIC_LIBRARY; }
private:
- bool HandleLocationPropertyPolicy();
+ bool HandleLocationPropertyPolicy() const;
// The set of include directories that are marked as system include
// directories.
@@ -614,42 +618,42 @@ private:
void AnalyzeLibDependencies( const cmMakefile& mf );
- const char* GetSuffixVariableInternal(bool implib);
- const char* GetPrefixVariableInternal(bool implib);
- std::string GetFullNameInternal(const char* config, bool implib);
+ const char* GetSuffixVariableInternal(bool implib) const;
+ const char* GetPrefixVariableInternal(bool implib) const;
+ std::string GetFullNameInternal(const char* config, bool implib) const;
void GetFullNameInternal(const char* config, bool implib,
std::string& outPrefix, std::string& outBase,
- std::string& outSuffix);
+ std::string& outSuffix) const;
// Use a makefile variable to set a default for the given property.
// If the variable is not defined use the given default instead.
void SetPropertyDefault(const char* property, const char* default_value);
// Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type.
- const char* GetOutputTargetType(bool implib);
+ const char* GetOutputTargetType(bool implib) const;
// Get the target base name.
- std::string GetOutputName(const char* config, bool implib);
+ std::string GetOutputName(const char* config, bool implib) const;
- const char* ImportedGetLocation(const char* config);
- const char* NormalGetLocation(const char* config);
+ const char* ImportedGetLocation(const char* config) const;
+ const char* NormalGetLocation(const char* config) const;
- std::string GetFullNameImported(const char* config, bool implib);
+ std::string GetFullNameImported(const char* config, bool implib) const;
- std::string ImportedGetFullPath(const char* config, bool implib);
+ std::string ImportedGetFullPath(const char* config, bool implib) const;
std::string NormalGetFullPath(const char* config, bool implib,
- bool realname);
+ bool realname) const;
/** Get the real name of the target. Allowed only for non-imported
targets. When a library or executable file is versioned this is
the full versioned name. If the target is not versioned this is
the same as GetFullName. */
- std::string NormalGetRealName(const char* config);
+ std::string NormalGetRealName(const char* config) const;
/** Append to @a base the mac content directory and return it. */
std::string BuildMacContentDirectory(const std::string& base,
const char* config,
- bool contentOnly);
+ bool contentOnly) const;
private:
std::string Name;
@@ -670,7 +674,7 @@ private:
std::string ExportMacro;
std::set<cmStdString> Utilities;
bool RecordDependencies;
- cmPropertyMap Properties;
+ mutable cmPropertyMap Properties;
LinkLibraryVectorType OriginalLinkLibraries;
bool DLLPlatform;
bool IsApple;
@@ -683,27 +687,30 @@ private:
// Cache target output paths for each configuration.
struct OutputInfo;
- OutputInfo const* GetOutputInfo(const char* config);
- bool ComputeOutputDir(const char* config, bool implib, std::string& out);
- bool ComputePDBOutputDir(const char* config, std::string& out);
+ OutputInfo const* GetOutputInfo(const char* config) const;
+ bool
+ ComputeOutputDir(const char* config, bool implib, std::string& out) const;
+ bool ComputePDBOutputDir(const char* config, std::string& out) const;
// Cache import information from properties for each configuration.
struct ImportInfo;
ImportInfo const* GetImportInfo(const char* config,
- cmTarget *workingTarget);
+ cmTarget const* workingTarget) const;
void ComputeImportInfo(std::string const& desired_config, ImportInfo& info,
- cmTarget *head);
+ cmTarget const* head) const;
- cmTargetLinkInformationMap LinkInformation;
+ mutable cmTargetLinkInformationMap LinkInformation;
void CheckPropertyCompatibility(cmComputeLinkInformation *info,
- const char* config);
+ const char* config) const;
bool ComputeLinkInterface(const char* config, LinkInterface& iface,
- cmTarget *head);
+ cmTarget const* head) const;
void ComputeLinkImplementation(const char* config,
- LinkImplementation& impl, cmTarget *head);
- void ComputeLinkClosure(const char* config, LinkClosure& lc, cmTarget *head);
+ LinkImplementation& impl,
+ cmTarget const* head) const;
+ void ComputeLinkClosure(const char* config, LinkClosure& lc,
+ cmTarget const* head) const;
void ClearLinkMaps();
@@ -735,7 +742,7 @@ private:
std::string const& base,
std::string const& suffix,
std::string const& name,
- const char* version);
+ const char* version) const;
};
typedef std::map<cmStdString,cmTarget> cmTargets;
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 744cb88..fa436cb 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -76,6 +76,13 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+.. productionlist::
+ grammar: `production`
+ production: "content rendered"
+
+.. note::
+ Notes are called out.
+
substituted text with multiple lines becomes one line
End of first include.
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index 5cb6d91..54952dd 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -83,6 +83,13 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+.. productionlist::
+ grammar: `production`
+ production: "content rendered"
+
+.. note::
+ Notes are called out.
+
.. |substitution| replace::
|nested substitution|
with multiple lines becomes one line
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index 8162f0c..ff40e30 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -59,6 +59,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "2")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
+set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/license.txt)
# Tell CPack all of the components to install. The "ALL"
# refers to the fact that this is the set of components that
@@ -120,4 +121,4 @@ if (NOT ("${CPackComponentWay}" STREQUAL "default"))
set(CPACK_PROJECT_CONFIG_FILE ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake)
endif ()
# Include CPack to introduce the appropriate targets
-include(CPack) \ No newline at end of file
+include(CPack)
diff --git a/Tests/CPackComponentsForAll/license.txt b/Tests/CPackComponentsForAll/license.txt
new file mode 100644
index 0000000..ba8ba48
--- /dev/null
+++ b/Tests/CPackComponentsForAll/license.txt
@@ -0,0 +1,3 @@
+LICENSE
+-------
+This is an installer created using CPack (http://www.cmake.org). No license provided.
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index ae8fda2..db4e08d 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -37,10 +37,19 @@ function(check_updates build)
REGEX "<(${types}|FullName)>"
LIMIT_INPUT ${max_update_xml_size}
)
+
string(REGEX REPLACE
"[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>"
"\\1{\\2}" UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ # If specified, remove the given prefix from the files in Update.xml.
+ # Some VCS systems, like Perforce, return absolute locations
+ if(DEFINED REPOSITORY_FILE_PREFIX)
+ string(REPLACE
+ "${REPOSITORY_FILE_PREFIX}" ""
+ UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ endif()
+
# Compare expected and actual entries
set(EXTRA "${UPDATE_XML_ENTRIES}")
list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE})
diff --git a/Tests/CTestUpdateP4.cmake.in b/Tests/CTestUpdateP4.cmake.in
index f23bd11..f0420c4 100644
--- a/Tests/CTestUpdateP4.cmake.in
+++ b/Tests/CTestUpdateP4.cmake.in
@@ -8,6 +8,7 @@ set(P4_TOP "${TOP}")
set(TOP "${TOP}/@CTestUpdateP4_DIR@")
# Include code common to all update tests.
+set(REPOSITORY_FILE_PREFIX "//ctest/")
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
#-----------------------------------------------------------------------------
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 97bf14d..99a0fb3 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -109,6 +109,7 @@ add_RunCMake_test(CMP0004)
add_RunCMake_test(TargetPolicies)
add_RunCMake_test(alias_targets)
add_RunCMake_test(interface_library)
+add_RunCMake_test(no_install_prefix)
find_package(Qt4 QUIET)
find_package(Qt5Core QUIET)
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
new file mode 100644
index 0000000..533d38c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
@@ -0,0 +1,26 @@
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_SONAME_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_LINKER_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
new file mode 100644
index 0000000..c47ee2b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+add_library(objlib OBJECT empty.c)
+add_custom_target(check ALL COMMAND echo
+ $<TARGET_FILE:objlib>
+ $<TARGET_SONAME_FILE:objlib>
+ $<TARGET_LINKER_FILE:objlib>
+ )
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 62bf29b..54d5064 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -7,4 +7,5 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
+run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
diff --git a/Tests/RunCMake/GeneratorExpression/empty.c b/Tests/RunCMake/GeneratorExpression/empty.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/empty.c
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
new file mode 100644
index 0000000..411cd7c
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at MissingSource.cmake:1 \(add_library\):
+ Cannot find source file:
+
+ missing.c
+
+ Tried extensions( \.[A-Za-z+]+|
+ )*
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource.cmake b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
new file mode 100644
index 0000000..258eaed
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
@@ -0,0 +1 @@
+add_library(A OBJECT missing.c)
diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
index a74eaa8..42973f8 100644
--- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
@@ -11,6 +11,7 @@ run_cmake(Install)
run_cmake(LinkObjLHS)
run_cmake(LinkObjRHS1)
run_cmake(LinkObjRHS2)
+run_cmake(MissingSource)
run_cmake(ObjWithObj)
run_cmake(PostBuild)
run_cmake(PreBuild)
diff --git a/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt b/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt
new file mode 100644
index 0000000..93c31cf
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ForEachBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x}:a
+\${x}:b$
diff --git a/Tests/RunCMake/Syntax/ForEachBracket1.cmake b/Tests/RunCMake/Syntax/ForEachBracket1.cmake
new file mode 100644
index 0000000..a55e21f
--- /dev/null
+++ b/Tests/RunCMake/Syntax/ForEachBracket1.cmake
@@ -0,0 +1,3 @@
+foreach(x a b)
+ message([[${x}:]] "${x}")
+endforeach()
diff --git a/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt b/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt
new file mode 100644
index 0000000..9ba6179
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:a,n,2,a;n,a,n,
+\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:b,n,2,b;n,b,n,$
diff --git a/Tests/RunCMake/Syntax/FunctionBracket1.cmake b/Tests/RunCMake/Syntax/FunctionBracket1.cmake
new file mode 100644
index 0000000..8ed4f65
--- /dev/null
+++ b/Tests/RunCMake/Syntax/FunctionBracket1.cmake
@@ -0,0 +1,6 @@
+function(fun x)
+ message([[${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}:]]
+ "${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}")
+endfunction(fun)
+fun(a n)
+fun(b n)
diff --git a/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt b/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt
new file mode 100644
index 0000000..9ba6179
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroBracket1-stderr.txt
@@ -0,0 +1,2 @@
+^\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:a,n,2,a;n,a,n,
+\${x},\${ARGN},\${ARGC},\${ARGV},\${ARGV0},\${ARGV1},\${ARGV2}:b,n,2,b;n,b,n,$
diff --git a/Tests/RunCMake/Syntax/MacroBracket1.cmake b/Tests/RunCMake/Syntax/MacroBracket1.cmake
new file mode 100644
index 0000000..ef6de20
--- /dev/null
+++ b/Tests/RunCMake/Syntax/MacroBracket1.cmake
@@ -0,0 +1,6 @@
+macro(mac x)
+ message([[${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}:]]
+ "${x},${ARGN},${ARGC},${ARGV},${ARGV0},${ARGV1},${ARGV2}")
+endmacro(mac)
+mac(a n)
+mac(b n)
diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index 4f42a07..5f05cfc 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -12,6 +12,9 @@ run_cmake(CommandComments)
run_cmake(CommandError0)
run_cmake(CommandError1)
run_cmake(CommandError2)
+run_cmake(ForEachBracket1)
+run_cmake(FunctionBracket1)
+run_cmake(MacroBracket1)
run_cmake(String0)
run_cmake(String1)
run_cmake(StringBackslash)
diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
new file mode 100644
index 0000000..12cd3c7
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/no_install_prefix/RunCMakeTest.cmake b/Tests/RunCMake/no_install_prefix/RunCMakeTest.cmake
new file mode 100644
index 0000000..2923449
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/RunCMakeTest.cmake
@@ -0,0 +1,15 @@
+include(RunCMake)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix")
+
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/prefix")
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/prefix/NoPrefix")
+file(WRITE "${RunCMake_BINARY_DIR}/prefix/NoPrefix/NoPrefixConfig.cmake" "")
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/prefix")
+run_cmake(with_install_prefix)
+
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/prefix")
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/prefix/NoPrefix")
+file(WRITE "${RunCMake_BINARY_DIR}/prefix/NoPrefix/NoPrefixConfig.cmake" "")
+list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_FIND_NO_INSTALL_PREFIX=1")
+run_cmake(no_install_prefix)
diff --git a/Tests/RunCMake/no_install_prefix/do_test.cmake b/Tests/RunCMake/no_install_prefix/do_test.cmake
new file mode 100644
index 0000000..340c7dc
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/do_test.cmake
@@ -0,0 +1,2 @@
+
+find_package(NoPrefix REQUIRED)
diff --git a/Tests/RunCMake/no_install_prefix/no_install_prefix-result.txt b/Tests/RunCMake/no_install_prefix/no_install_prefix-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/no_install_prefix-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/no_install_prefix/no_install_prefix-stderr.txt b/Tests/RunCMake/no_install_prefix/no_install_prefix-stderr.txt
new file mode 100644
index 0000000..66c6241
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/no_install_prefix-stderr.txt
@@ -0,0 +1,18 @@
+CMake Error at do_test.cmake:2 \(find_package\):
+ By not providing "FindNoPrefix.cmake" in CMAKE_MODULE_PATH this project has
+ asked CMake to find a package configuration file provided by "NoPrefix",
+ but CMake did not find one.
+
+ Could not find a package configuration file provided by "NoPrefix" with any
+ of the following names:
+
+ NoPrefixConfig.cmake
+ noprefix-config.cmake
+
+ Add the installation prefix of "NoPrefix" to CMAKE_PREFIX_PATH or set
+ "NoPrefix_DIR" to a directory containing one of the above files. If
+ "NoPrefix" provides a separate development package or SDK, be sure it has
+ been installed.
+Call Stack \(most recent call first\):
+ no_install_prefix.cmake:2 \(include\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/no_install_prefix/no_install_prefix.cmake b/Tests/RunCMake/no_install_prefix/no_install_prefix.cmake
new file mode 100644
index 0000000..c7d28da
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/no_install_prefix.cmake
@@ -0,0 +1,2 @@
+
+include(do_test.cmake)
diff --git a/Tests/RunCMake/no_install_prefix/with_install_prefix-result.txt b/Tests/RunCMake/no_install_prefix/with_install_prefix-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/with_install_prefix-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/no_install_prefix/with_install_prefix-stderr.txt b/Tests/RunCMake/no_install_prefix/with_install_prefix-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/with_install_prefix-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/no_install_prefix/with_install_prefix.cmake b/Tests/RunCMake/no_install_prefix/with_install_prefix.cmake
new file mode 100644
index 0000000..c7d28da
--- /dev/null
+++ b/Tests/RunCMake/no_install_prefix/with_install_prefix.cmake
@@ -0,0 +1,2 @@
+
+include(do_test.cmake)