Merge branch 'master' into sublime-text-2-generator

This commit is contained in:
Morné Chamberlain 2012-10-17 23:29:53 +02:00
commit d022d4ec78
78 changed files with 937 additions and 190 deletions

View File

@ -73,6 +73,8 @@ function(GET_VS_VERSION_STRING generator var)
set(${var} ${ver_string} PARENT_SCOPE)
endfunction()
include(CTestUseLaunchers)
if(BUILD_TESTING)
# Setup some auxilary macros
macro(SET_IF_NOT_SET var val)
@ -243,18 +245,6 @@ if(BUILD_TESTING)
set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
set(CTEST_USE_LAUNCHERS 0)
endif()
if(CTEST_USE_LAUNCHERS)
set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
endif()
mark_as_advanced(
BZRCOMMAND
BZR_UPDATE_OPTIONS

View File

@ -0,0 +1,49 @@
# - Set the RULE_LAUNCH_* global properties when CTEST_USE_LAUNCHERS is on.
# CTestUseLaunchers is automatically included when you include(CTest).
# However, it is split out into its own module file so projects
# can use the CTEST_USE_LAUNCHERS functionality independently.
#
# To use launchers, set CTEST_USE_LAUNCHERS to ON in a ctest -S
# dashboard script, and then also set it in the cache of the configured
# project. Both cmake and ctest need to know the value of it for the launchers
# to work properly. CMake needs to know in order to generate proper build
# rules, and ctest, in order to produce the proper error and warning
# analysis.
#
# For convenience, you may set the ENV variable CTEST_USE_LAUNCHERS_DEFAULT
# in your ctest -S script, too. Then, as long as your CMakeLists uses
# include(CTest) or include(CTestUseLaunchers), it will use the value of the
# ENV variable to initialize a CTEST_USE_LAUNCHERS cache variable. This cache
# variable initialization only occurs if CTEST_USE_LAUNCHERS is not already
# defined.
#=============================================================================
# Copyright 2008-2012 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT})
set(CTEST_USE_LAUNCHERS "$ENV{CTEST_USE_LAUNCHERS_DEFAULT}"
CACHE INTERNAL "CTEST_USE_LAUNCHERS initial value from ENV")
endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
set(CTEST_USE_LAUNCHERS 0)
endif()
if(CTEST_USE_LAUNCHERS)
set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
set(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
endif()

View File

@ -111,6 +111,7 @@ find_path(PostgreSQL_TYPE_INCLUDE_DIR
# Look in other places.
${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES
postgresql
pgsql/server
postgresql/server
include/server

View File

@ -61,7 +61,7 @@
# If the check fails and QUIET is not given the function terminates
# with a FATAL_ERROR message describing the problem. The purpose of
# this check is to stop a build early for incompatible compiler
# combinations.
# combinations. The test is built in the Release configuration.
#
# FortranCInterface is aware of possible GLOBAL and MODULE manglings
# for many Fortran compilers, but it also provides an interface to
@ -250,6 +250,7 @@ function(FortranCInterface_VERIFY)
message(STATUS "${_desc}")
# Build a sample project which reports symbols.
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
try_compile(FortranCInterface_VERIFY_${lang}_COMPILED
${FortranCInterface_BINARY_DIR}/Verify${lang}
${FortranCInterface_SOURCE_DIR}/Verify
@ -259,6 +260,9 @@ function(FortranCInterface_VERIFY)
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
"-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}"
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}"
"-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}"
OUTPUT_VARIABLE _output)
file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")

View File

@ -902,7 +902,7 @@ SectionEnd
Function .onInit
StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "UninstallString"
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString"
StrCmp $0 "" inst
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \

View File

@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 9)
set(CMake_VERSION_TWEAK 20121012)
set(CMake_VERSION_TWEAK 20121017)
#set(CMake_VERSION_RC 1)

View File

@ -31,12 +31,22 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
"Each CPack generator as a built-in default value for this"
" variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
" the top level whereas RPM or DEB don't. The user may override"
" the default value byt setting this variable.\n"
" the default value by setting this variable.\n"
"There is a similar variable "
"CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY"
"CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY "
"which may be used to override the behavior for the component"
"packaging case which may have different default value for"
"historical (now backward compatibility) reason.", false,
" packaging case which may have different default value for"
" historical (now backward compatibility) reason.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
"Boolean toggle to include/exclude top level directory "
"(component case).",
"Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
" but for the component case. "
"See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation for"
" the detail.", false,
"Variables common to all CPack generators");
cm->DefineProperty

View File

@ -855,7 +855,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// If CPack was asked to warn on ABSOLUTE INSTALL DESTINATION
// then forward request to cmake_install.cmake script
if (this->GetOption("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION"))
if (this->IsOn("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION"))
{
mf->AddDefinition("CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION",
"1");
@ -865,7 +865,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// then ask cmake_install.cmake script to error out
// as soon as it occurs (before installing file)
if (!SupportsAbsoluteDestination() ||
this->GetOption("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION"))
this->IsOn("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION"))
{
mf->AddDefinition("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION",
"1");
@ -905,7 +905,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
localFileName =
cmSystemTools::RelativePath(InstallPrefix, fit->c_str());
localFileName =
localFileName.substr(localFileName.find('/')+1,
localFileName.substr(localFileName.find_first_not_of('/'),
std::string::npos);
Components[installComponent].Files.push_back(localFileName);
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"

View File

@ -247,7 +247,8 @@ void cmCTestMemCheckHandler::GenerateTestCommand(
{
std::vector<cmStdString>::size_type pp;
std::string memcheckcommand = "";
memcheckcommand = this->MemoryTester;
memcheckcommand
= cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str());
for ( pp = 0; pp < this->MemoryTesterOptions.size(); pp ++ )
{
args.push_back(this->MemoryTesterOptions[pp]);
@ -410,29 +411,46 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
"MemoryCheckCommand").c_str()) )
{
this->MemoryTester
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
"MemoryCheckCommand").c_str());
= this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str();
// determine the checker type
if ( this->MemoryTester.find("valgrind") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND;
}
else if ( this->MemoryTester.find("purify") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY;
}
else if ( this->MemoryTester.find("BC") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
}
else
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::UNKNOWN;
}
}
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
"PurifyCommand").c_str()) )
{
this->MemoryTester
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
"PurifyCommand").c_str());
= this->CTest->GetCTestConfiguration("PurifyCommand").c_str();
this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY;
}
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
"ValgrindCommand").c_str()) )
{
this->MemoryTester
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
"ValgrindCommand").c_str());
= this->CTest->GetCTestConfiguration("ValgrindCommand").c_str();
this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND;
}
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
"BoundsCheckerCommand").c_str()) )
{
this->MemoryTester
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
"BoundsCheckerCommand").c_str());
= this->CTest->GetCTestConfiguration("BoundsCheckerCommand").c_str();
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
}
else
{
@ -470,9 +488,9 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterOutputFile
= this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log";
if ( this->MemoryTester.find("valgrind") != std::string::npos )
switch ( this->MemoryTesterStyle )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND;
case cmCTestMemCheckHandler::VALGRIND:
if ( this->MemoryTesterOptions.empty() )
{
this->MemoryTesterOptions.push_back("-q");
@ -498,10 +516,9 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
+ this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile");
this->MemoryTesterOptions.push_back(suppressions);
}
}
else if ( this->MemoryTester.find("purify") != std::string::npos )
break;
case cmCTestMemCheckHandler::PURIFY:
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY;
std::string outputFile;
#ifdef _WIN32
if( this->CTest->GetCTestConfiguration(
@ -526,22 +543,22 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
#endif
outputFile += this->MemoryTesterOutputFile;
this->MemoryTesterOptions.push_back(outputFile);
break;
}
else if ( this->MemoryTester.find("BC") != std::string::npos )
case cmCTestMemCheckHandler::BOUNDS_CHECKER:
{
this->BoundsCheckerXMLFile = this->MemoryTesterOutputFile;
std::string dpbdFile = this->CTest->GetBinaryDir()
+ "/Testing/Temporary/MemoryChecker.DPbd";
this->BoundsCheckerDPBDFile = dpbdFile;
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
this->MemoryTesterOptions.push_back("/B");
this->MemoryTesterOptions.push_back(dpbdFile);
this->MemoryTesterOptions.push_back("/X");
this->MemoryTesterOptions.push_back(this->MemoryTesterOutputFile);
this->MemoryTesterOptions.push_back("/M");
break;
}
else
{
default:
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Do not understand memory checker: " << this->MemoryTester.c_str()
<< std::endl);

View File

@ -1304,9 +1304,10 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec)
for ( it = vec.begin(); it != vec.end(); ++it )
{
int retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it
std::string cmd = cmSystemTools::ConvertToOutputPath(it->c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << cmd
<< std::endl);
if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0,
if ( !cmSystemTools::RunSingleCommand(cmd.c_str(), 0, &retVal, 0,
cmSystemTools::OUTPUT_MERGE
/*this->Verbose*/) || retVal != 0 )
{

View File

@ -623,7 +623,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
// the compilerdefines for this target
std::string cdefs = gtgt->GetCompileDefinitions();
if(cdefs.empty())
if(!cdefs.empty())
{
// Expand the list.
std::vector<std::string> defs;
@ -640,8 +640,10 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
std::set<std::string> uniqIncludeDirs;
std::vector<std::string> includes;
const char *config = target->GetMakefile()
->GetDefinition("CMAKE_BUILD_TYPE");
target->GetMakefile()->GetLocalGenerator()->
GetIncludeDirectories(includes, gtgt);
GetIncludeDirectories(includes, gtgt, "C", config);
for(std::vector<std::string>::const_iterator dirIt=includes.begin();
dirIt != includes.end();
++dirIt)

View File

@ -890,7 +890,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
l != targets.end(); ++l)
{
std::vector<std::string> includeDirs;
(*it)->GetIncludeDirectories(includeDirs, l->second);
const char *config = mf->GetDefinition("CMAKE_BUILD_TYPE");
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
this->AppendIncludeDirectories(fout, includeDirs, emmited);
}
}

View File

@ -13,6 +13,7 @@
#include "cmMakefile.h"
#include "cmTarget.h"
#include "assert.h"
#include <cmsys/String.h>
@ -129,3 +130,51 @@ cmCompiledGeneratorExpression::~cmCompiledGeneratorExpression()
delete *it;
}
}
std::string cmGeneratorExpression::Preprocess(const std::string &input,
PreprocessContext context)
{
if (context != StripAllGeneratorExpressions)
{
assert(!"cmGeneratorExpression::Preprocess called with invalid args");
return std::string();
}
std::string result;
std::string::size_type pos = 0;
std::string::size_type lastPos = pos;
while((pos = input.find("$<", lastPos)) != input.npos)
{
result += input.substr(lastPos, pos - lastPos);
pos += 2;
int nestingLevel = 1;
const char *c = input.c_str() + pos;
const char * const cStart = c;
for ( ; *c; ++c)
{
if(c[0] == '$' && c[1] == '<')
{
++nestingLevel;
++c;
continue;
}
if(c[0] == '>')
{
--nestingLevel;
if (nestingLevel == 0)
{
break;
}
}
}
const std::string::size_type traversed = (c - cStart) + 1;
if (!*c)
{
result += "$<" + input.substr(pos, traversed);
}
pos += traversed;
lastPos = pos;
}
result += input.substr(lastPos);
return result;
}

View File

@ -48,6 +48,13 @@ public:
const cmCompiledGeneratorExpression& Parse(std::string const& input);
const cmCompiledGeneratorExpression& Parse(const char* input);
enum PreprocessContext {
StripAllGeneratorExpressions
};
static std::string Preprocess(const std::string &input,
PreprocessContext context);
private:
cmGeneratorExpression(const cmGeneratorExpression &);
void operator=(const cmGeneratorExpression &);

View File

@ -17,7 +17,10 @@
#include "cmGeneratorExpression.h"
//----------------------------------------------------------------------------
static void reportError(cmGeneratorExpressionContext *context,
#if !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x510
static
#endif
void reportError(cmGeneratorExpressionContext *context,
const std::string &expr, const std::string &result)
{
context->HadError = true;

View File

@ -14,6 +14,8 @@
#include "cmGeneratorExpressionEvaluator.h"
#include "assert.h"
//----------------------------------------------------------------------------
cmGeneratorExpressionParser::cmGeneratorExpressionParser(
const std::vector<cmGeneratorExpressionToken> &tokens)
@ -75,6 +77,7 @@ static void extendResult(std::vector<cmGeneratorExpressionEvaluator*> &result,
void cmGeneratorExpressionParser::ParseGeneratorExpression(
std::vector<cmGeneratorExpressionEvaluator*> &result)
{
assert(this->it != this->Tokens.end());
unsigned int nestedLevel = this->NestingLevel;
++this->NestingLevel;
@ -96,12 +99,14 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
// ERROR
}
if (this->it->TokenType == cmGeneratorExpressionToken::EndExpression)
if (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::EndExpression)
{
GeneratorExpressionContent *content = new GeneratorExpressionContent(
startToken->Content, this->it->Content
- startToken->Content
+ this->it->Length);
assert(this->it != this->Tokens.end());
++this->it;
--this->NestingLevel;
content->SetIdentifier(identifier);
@ -113,39 +118,58 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator>
commaTokens;
std::vector<cmGeneratorExpressionToken>::const_iterator colonToken;
if (this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
if (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
{
colonToken = this->it;
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
while (this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
{
commaTokens.push_back(this->it);
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
}
while(this->it->TokenType != cmGeneratorExpressionToken::EndExpression)
{
this->ParseContent(*(parameters.end() - 1));
while (this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
{
commaTokens.push_back(this->it);
parameters.resize(parameters.size() + 1);
++this->it;
}
if (this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
{
extendText(*(parameters.end() - 1), this->it);
assert(this->it != this->Tokens.end());
++this->it;
}
while (this->it != this->Tokens.end() &&
this->it->TokenType != cmGeneratorExpressionToken::EndExpression)
{
this->ParseContent(*(parameters.end() - 1));
if (this->it == this->Tokens.end())
{
break;
}
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
{
commaTokens.push_back(this->it);
parameters.resize(parameters.size() + 1);
assert(this->it != this->Tokens.end());
++this->it;
}
if(this->it->TokenType == cmGeneratorExpressionToken::EndExpression)
while (this->it != this->Tokens.end() &&
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
{
extendText(*(parameters.end() - 1), this->it);
assert(this->it != this->Tokens.end());
++this->it;
}
}
if(this->it != this->Tokens.end()
&& this->it->TokenType == cmGeneratorExpressionToken::EndExpression)
{
--this->NestingLevel;
assert(this->it != this->Tokens.end());
++this->it;
}
}
@ -168,6 +192,7 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
parameters.end();
std::vector<TokenVector::const_iterator>::const_iterator commaIt =
commaTokens.begin();
assert(parameters.size() > commaTokens.size());
for ( ; pit != pend; ++pit, ++commaIt)
{
extendResult(result, *pit);
@ -175,6 +200,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
{
extendText(result, *commaIt);
}
else
{
break;
}
}
}
return;
@ -194,6 +223,7 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
void cmGeneratorExpressionParser::ParseContent(
std::vector<cmGeneratorExpressionEvaluator*> &result)
{
assert(this->it != this->Tokens.end());
switch(this->it->TokenType)
{
case cmGeneratorExpressionToken::Text:
@ -210,6 +240,7 @@ void cmGeneratorExpressionParser::ParseContent(
TextContent *textContent =
static_cast<TextContent*>(*(result.end() - 1));
textContent->Extend(this->it->Length);
assert(this->it != this->Tokens.end());
++this->it;
return;
}
@ -217,10 +248,12 @@ void cmGeneratorExpressionParser::ParseContent(
cmGeneratorExpressionEvaluator* n = new TextContent(this->it->Content,
this->it->Length);
result.push_back(n);
assert(this->it != this->Tokens.end());
++this->it;
return ;
}
case cmGeneratorExpressionToken::BeginExpression:
assert(this->it != this->Tokens.end());
++this->it;
this->ParseGeneratorExpression(result);
return;
@ -233,10 +266,11 @@ void cmGeneratorExpressionParser::ParseContent(
}
else
{
// TODO: Unreachable. Assert?
assert(!"Got unexpected syntax token.");
}
assert(this->it != this->Tokens.end());
++this->it;
return;
}
// Unreachable. Assert?
assert(!"Unhandled token in generator expression.");
}

View File

@ -287,7 +287,8 @@ const char* cmGeneratorTarget::GetCreateRuleVariable()
}
//----------------------------------------------------------------------------
std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories()
std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
const char *config)
{
std::vector<std::string> includes;
const char *prop = this->Target->GetProperty("INCLUDE_DIRECTORIES");
@ -296,7 +297,6 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories()
return includes;
}
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
cmListFileBacktrace lfbt;
cmGeneratorExpression ge(lfbt);

View File

@ -72,7 +72,7 @@ public:
const char* GetCreateRuleVariable();
/** Get the include directories for this target. */
std::vector<std::string> GetIncludeDirectories();
std::vector<std::string> GetIncludeDirectories(const char *config);
std::string GetCompileDefinitions(const char *config = 0);

View File

@ -25,6 +25,7 @@
#include "cmComputeTargetDepends.h"
#include "cmGeneratedFileStream.h"
#include "cmGeneratorTarget.h"
#include "cmGeneratorExpression.h"
#include <cmsys/Directory.hxx>
@ -1152,13 +1153,13 @@ void cmGlobalGenerator::CheckLocalGenerators()
{
manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
this->LocalGenerators[i]->ConfigureFinalPass();
cmGeneratorTargetsType targets =
this->LocalGenerators[i]->GetMakefile()->GetGeneratorTargets();
for (cmGeneratorTargetsType::iterator l = targets.begin();
cmTargets &targets =
this->LocalGenerators[i]->GetMakefile()->GetTargets();
for (cmTargets::iterator l = targets.begin();
l != targets.end(); l++)
{
const cmTarget::LinkLibraryVectorType& libs =
l->second->Target->GetOriginalLinkLibraries();
l->second.GetOriginalLinkLibraries();
for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin();
lib != libs.end(); ++lib)
{
@ -1174,14 +1175,23 @@ void cmGlobalGenerator::CheckLocalGenerators()
}
std::string text = notFoundMap[varName];
text += "\n linked by target \"";
text += l->second->GetName();
text += l->second.GetName();
text += "\" in directory ";
text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory();
notFoundMap[varName] = text;
}
}
std::vector<std::string> incs;
this->LocalGenerators[i]->GetIncludeDirectories(incs, l->second);
const char *incDirProp = l->second.GetProperty("INCLUDE_DIRECTORIES");
if (!incDirProp)
{
continue;
}
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
cmGeneratorExpression::StripAllGeneratorExpressions);
cmSystemTools::ExpandListArgument(incDirs.c_str(), incs);
for( std::vector<std::string>::const_iterator incDir = incs.begin();
incDir != incs.end(); ++incDir)

View File

@ -1947,7 +1947,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
std::vector<std::string> includes;
this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt);
this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt,
"C", configName);
std::set<cmStdString> emitted;
emitted.insert("/System/Library/Frameworks");
for(std::vector<std::string>::iterator i = includes.begin();

View File

@ -1324,7 +1324,8 @@ std::string cmLocalGenerator::GetIncludeFlags(
//----------------------------------------------------------------------------
void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
cmGeneratorTarget* target,
const char* lang)
const char* lang,
const char *config)
{
// Need to decide whether to automatically include the source and
// binary directories at the beginning of the include path.
@ -1417,7 +1418,7 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
// Get the target-specific include directories.
std::vector<std::string> includes;
includes = target->GetIncludeDirectories();
includes = target->GetIncludeDirectories(config);
// Support putting all the in-project include directories first if
// it is requested by the project.

View File

@ -212,7 +212,7 @@ public:
/** Get the include flags for the current makefile and language. */
void GetIncludeDirectories(std::vector<std::string>& dirs,
cmGeneratorTarget* target,
const char* lang = "C");
const char* lang = "C", const char *config = 0);
/** Compute the language used to compile the given source file. */
const char* GetSourceFileLanguage(const cmSourceFile& source);

View File

@ -853,7 +853,8 @@ inline std::string removeQuotes(const std::string& s)
std::string
cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target)
cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target,
const char *config)
{
std::string includeOptions;
@ -868,7 +869,7 @@ cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target)
for(int j=0; j < 2; ++j)
{
std::vector<std::string> includes;
this->GetIncludeDirectories(includes, gt);
this->GetIncludeDirectories(includes, gt, "C", config);
std::vector<std::string>::iterator i;
for(i = includes.begin(); i != includes.end(); ++i)
@ -1147,7 +1148,15 @@ void cmLocalVisualStudio6Generator
#endif
// Get include options for this target.
std::string includeOptions = this->GetTargetIncludeOptions(target);
std::string includeOptionsDebug = this->GetTargetIncludeOptions(target,
"DEBUG");
std::string includeOptionsRelease = this->GetTargetIncludeOptions(target,
"RELEASE");
std::string includeOptionsRelWithDebInfo = this->GetTargetIncludeOptions(
target,
"RELWITHDEBINFO");
std::string includeOptionsMinSizeRel = this->GetTargetIncludeOptions(target,
"MINSIZEREL");
// Get extra linker options for this target type.
std::string extraLinkOptions;
@ -1560,8 +1569,15 @@ void cmLocalVisualStudio6Generator
cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO",
optionsRelWithDebInfo.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES",
includeOptions.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_DEBUG",
includeOptionsDebug.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELEASE",
includeOptionsRelease.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_MINSIZEREL",
includeOptionsMinSizeRel.c_str());
cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELWITHDEBINFO",
includeOptionsRelWithDebInfo.c_str());
cmSystemTools::ReplaceString(line, "TARGET_VERSION_FLAG",
targetVersionFlag.c_str());
cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_DEBUG",

View File

@ -90,7 +90,7 @@ private:
std::string& options);
void OutputObjects(cmTarget& target, const char* tool,
std::string& options);
std::string GetTargetIncludeOptions(cmTarget &target);
std::string GetTargetIncludeOptions(cmTarget &target, const char *config);
std::vector<std::string> Configurations;
std::string GetConfigName(std::string const& configuration) const;

View File

@ -814,7 +814,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
fout << "\t\t\t\tAdditionalIncludeDirectories=\"";
std::vector<std::string> includes;
this->GetIncludeDirectories(includes, gt);
this->GetIncludeDirectories(includes, gt, "C", configName);
std::vector<std::string>::iterator i = includes.begin();
for(;i != includes.end(); ++i)
{

View File

@ -11,6 +11,7 @@
============================================================================*/
#include "cmMakeDepend.h"
#include "cmSystemTools.h"
#include "cmGeneratorExpression.h"
#include <cmsys/RegularExpression.hxx>
@ -58,12 +59,22 @@ void cmMakeDepend::SetMakefile(cmMakefile* makefile)
// Now extract any include paths from the targets
std::set<std::string> uniqueIncludes;
std::vector<std::string> orderedAndUniqueIncludes;
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
for (cmGeneratorTargetsType::iterator l = targets.begin();
cmTargets &targets = this->Makefile->GetTargets();
for (cmTargets::iterator l = targets.begin();
l != targets.end(); ++l)
{
const std::vector<std::string>& includes =
l->second->GetIncludeDirectories();
const char *incDirProp = l->second.GetProperty("INCLUDE_DIRECTORIES");
if (!incDirProp)
{
continue;
}
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
cmGeneratorExpression::StripAllGeneratorExpressions);
std::vector<std::string> includes;
cmSystemTools::ExpandListArgument(incDirs.c_str(), includes);
for(std::vector<std::string>::const_iterator j = includes.begin();
j != includes.end(); ++j)
{

View File

@ -1057,8 +1057,11 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
*this->InfoFileStream
<< "SET(CMAKE_C_TARGET_INCLUDE_PATH\n";
std::vector<std::string> includes;
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget);
this->GeneratorTarget,
"C", config);
for(std::vector<std::string>::iterator i = includes.begin();
i != includes.end(); ++i)
{
@ -1543,8 +1546,11 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
emitted.insert("/System/Library/Frameworks");
#endif
std::vector<std::string> includes;
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget);
this->GeneratorTarget,
"C", config);
std::vector<std::string>::iterator i;
// check all include directories for frameworks as this
// will already have added a -F for the framework
@ -1849,8 +1855,10 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
std::vector<std::string> includes;
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget, lang);
this->GeneratorTarget,
lang, config);
std::string includeFlags =
this->LocalGenerator->GetIncludeFlags(includes, lang, useResponseFile);
@ -1953,8 +1961,10 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG"))
{
std::vector<std::string> includes;
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget);
this->GeneratorTarget,
"C", config);
for(std::vector<std::string>::const_iterator idi = includes.begin();
idi != includes.end(); ++idi)
{

View File

@ -152,8 +152,10 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source,
// Add include directory flags.
{
std::vector<std::string> includes;
this->LocalGenerator->GetIncludeDirectories(includes, this->GeneratorTarget,
language.c_str());
const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget,
language.c_str(), config);
std::string includeFlags =
this->LocalGenerator->GetIncludeFlags(includes, language.c_str(),
language == "RC" ? true : false); // full include paths for RC

View File

@ -170,7 +170,8 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
++fileIt)
{
cmSourceFile* sf = *fileIt;
std::string absFile = sf->GetFullPath();
std::string absFile = cmsys::SystemTools::GetRealPath(
sf->GetFullPath().c_str());
bool skip = cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOMOC"));
bool generated = cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"));

View File

@ -1586,12 +1586,13 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
std::vector<std::string> *configs =
static_cast<cmGlobalVisualStudio7Generator *>
(this->GlobalGenerator)->GetConfigurations();
std::vector<std::string> includes;
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget);
for(std::vector<std::string>::iterator i = configs->begin();
i != configs->end(); ++i)
{
std::vector<std::string> includes;
this->LocalGenerator->GetIncludeDirectories(includes,
this->GeneratorTarget,
"C", i->c_str());
this->WritePlatformConfigTag("ItemDefinitionGroup", i->c_str(), 1);
*this->BuildFileStream << "\n";
// output cl compile flags <ClCompile></ClCompile>

View File

@ -59,13 +59,13 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELEASE
BSC32=bscmake.exe
@ -93,13 +93,13 @@ CMAKE_CUSTOM_RULE_CODE_RELEASE
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_DEBUG
BSC32=bscmake.exe
@ -129,13 +129,13 @@ CMAKE_CUSTOM_RULE_CODE_DEBUG
# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c OUTPUT_LIBNAME_EXPORTS
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
BSC32=bscmake.exe
@ -163,13 +163,13 @@ CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" OUTPUT_LIBNAME_EXPORTS /FD /c
# ADD CPP /nologo /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
BSC32=bscmake.exe

View File

@ -58,11 +58,11 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELEASE
BSC32=bscmake.exe
@ -90,13 +90,13 @@ CMAKE_CUSTOM_RULE_CODE_RELEASE
# PROP Target_Dir ""
# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /GZ /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_DEBUG
BSC32=bscmake.exe
@ -122,12 +122,12 @@ CMAKE_CUSTOM_RULE_CODE_DEBUG
# PROP Intermediate_Dir "MinSizeRel"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP /nologo /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP /nologo /D "WIN32" BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
BSC32=bscmake.exe
@ -155,11 +155,11 @@ CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
BSC32=bscmake.exe

View File

@ -58,13 +58,13 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELEASE
BSC32=bscmake.exe
@ -92,13 +92,13 @@ CMAKE_CUSTOM_RULE_CODE_RELEASE
# PROP Target_Dir ""
# ADD BASE CPP /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /GZ /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_DEBUG
BSC32=bscmake.exe
@ -125,11 +125,11 @@ CMAKE_CUSTOM_RULE_CODE_DEBUG
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
BSC32=bscmake.exe
@ -157,13 +157,13 @@ CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES OUTPUT_LIBNAME_EXPORTS
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
BSC32=bscmake.exe

View File

@ -55,11 +55,11 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP BUILD_INCLUDES_RELEASE EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELEASE
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELEASE /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELEASE
BSC32=bscmake.exe
@ -85,11 +85,11 @@ CMAKE_CUSTOM_RULE_CODE_RELEASE
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP BUILD_INCLUDES_DEBUG EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_DEBUG
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "_DEBUG"
# ADD RSC BUILD_INCLUDES_DEBUG /l 0x409 /d "_DEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_DEBUG
BSC32=bscmake.exe
@ -116,11 +116,11 @@ CMAKE_CUSTOM_RULE_CODE_DEBUG
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "_ATL_DLL" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP BUILD_INCLUDES_MINSIZEREL EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_MINSIZEREL
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_MINSIZEREL /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_MINSIZEREL
BSC32=bscmake.exe
@ -146,11 +146,11 @@ CMAKE_CUSTOM_RULE_CODE_MINSIZEREL
# PROP Target_Dir ""
# ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c
# ADD CPP /nologo /D "NDEBUG" /D "WIN32" /D "_LIB" /FD /c
# ADD CPP BUILD_INCLUDES EXTRA_DEFINES
# ADD CPP BUILD_INCLUDES_RELWITHDEBINFO EXTRA_DEFINES
# ADD CPP CMAKE_CXX_FLAGS
# ADD CPP CMAKE_CXX_FLAGS_RELWITHDEBINFO
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES /l 0x409 /d "NDEBUG"
# ADD RSC BUILD_INCLUDES_RELWITHDEBINFO /l 0x409 /d "NDEBUG"
# ADD RSC COMPILE_DEFINITIONS
# ADD RSC COMPILE_DEFINITIONS_RELWITHDEBINFO
BSC32=bscmake.exe

View File

@ -57,6 +57,8 @@ if(BUILD_TESTING)
add_subdirectory(FindPackageModeMakefileTest)
add_subdirectory(CTestTestMemcheck)
# Collect a list of all test build directories.
set(TEST_BUILD_DIRS)

View File

@ -0,0 +1,81 @@
foreach (_retval 0 1)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ret${_retval}.c" "int main(){return ${_retval};}\n")
endforeach ()
# create binaries that we will use as a pseudo memory checker
add_executable(pseudo_valgrind "${CMAKE_CURRENT_BINARY_DIR}/ret0.c")
set_target_properties(pseudo_valgrind PROPERTIES OUTPUT_NAME valgrind)
# Xcode 2.x forgets to create the output directory before linking
# the individual architectures.
if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]")
add_custom_command(TARGET pseudo_valgrind
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}"
)
endif()
add_executable(pseudo_purify "${CMAKE_CURRENT_BINARY_DIR}/ret0.c")
set_target_properties(pseudo_purify PROPERTIES OUTPUT_NAME purify)
add_executable(pseudo_BC "${CMAKE_CURRENT_BINARY_DIR}/ret0.c")
set_target_properties(pseudo_BC PROPERTIES OUTPUT_NAME BC)
# binary to be used as pre- and post-memcheck command that fails
add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.c")
foreach (_test IN ITEMS Unknown UnknownQuoted NotExist
DummyValgrind DummyValgrindPrePost
DummyValgrindFailPre DummyValgrindFailPost
DummyPurify DummyBC
DummyValgrindIgnoreMemcheck)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/${_test}/test.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake"
@ONLY ESCAPE_QUOTES)
add_test(NAME CTestTestMemcheck${_test}
COMMAND ${CMAKE_CTEST_COMMAND}
-S "${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake" -V
--output-log "${CMAKE_CURRENT_BINARY_DIR}/${_test}/testOutput.log"
-D PSEUDO_BC=$<TARGET_FILE:pseudo_BC>
-D PSEUDO_PURIFY=$<TARGET_FILE:pseudo_purify>
-D PSEUDO_VALGRIND=$<TARGET_FILE:pseudo_valgrind>
-D ERROR_COMMAND=$<TARGET_FILE:memcheck_fail>
)
endforeach ()
string(REPLACE "\\" "\\\\" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND}")
string(REPLACE "(" "\\(" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}")
string(REPLACE ")" "\\)" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}")
string(REPLACE "+" "\\+" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}")
foreach (_unkn Unknown UnknownQuoted)
set_tests_properties(CTestTestMemcheck${_unkn} PROPERTIES
PASS_REGULAR_EXPRESSION "Do not understand memory checker: ${CMAKE_COMMAND_ESCAPED}\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/${_unkn}/test.cmake\n")
endforeach ()
set_tests_properties(CTestTestMemcheckNotExist PROPERTIES
PASS_REGULAR_EXPRESSION "Memory checker \\(MemoryCheckCommand\\) not set, or cannot find the specified program.")
set(NORMAL_CTEST_OUTPUT "\n-- Processing memory checking output: \nMemory checking results:\n(BullseyeCoverage[^\n]*\n)?")
# It is a valid result if valgrind does not output any files (can e.g. happen
# if you have not compiled in debug mode), so these tests will not fail.
set_tests_properties(CTestTestMemcheckDummyValgrind CTestTestMemcheckDummyValgrindPrePost
PROPERTIES
PASS_REGULAR_EXPRESSION "${NORMAL_CTEST_OUTPUT}")
foreach (_pp Pre Post)
string(TOLOWER ${_pp} _pp_lower)
set_tests_properties(CTestTestMemcheckDummyValgrindFail${_pp}
PROPERTIES
PASS_REGULAR_EXPRESSION "\nProblem running command: ${CMAKE_CURRENT_BINARY_DIR}[^\n]*fail[^\n]*\n(.*\n)?Problem executing ${_pp_lower}-memcheck command\\(s\\\).\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindFail${_pp}/test.cmake\n")
endforeach ()
set_tests_properties(CTestTestMemcheckDummyValgrindIgnoreMemcheck
PROPERTIES
PASS_REGULAR_EXPRESSION "\n2/2 Test #2: RunCMakeAgain .*\n1/1 MemCheck #1: RunCMake .*${NORMAL_CTEST_OUTPUT}")
set_tests_properties(CTestTestMemcheckDummyPurify PROPERTIES
PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/Testing/Temporary/MemoryChecker.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/test.cmake\n")
set_tests_properties(CTestTestMemcheckDummyBC PROPERTIES
PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CMAKE_CURRENT_BINARY_DIR}/DummyBC/Testing/Temporary/MemoryChecker.log\n(.*\n)?Error parsing XML in stream at line 1: no element found\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyBC/test.cmake\n")

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyBC)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyBC")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyBC")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyBC")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyBC")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_BC}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyPurify)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyPurify")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyPurify")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyPurify")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyPurify")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_PURIFY}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyValgrind)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrind")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrind")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrind")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyValgrindFailPost)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrindFailPost")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindFailPost")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPost")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
set(CTEST_CUSTOM_POST_MEMCHECK "${ERROR_COMMAND}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyValgrindFailPre)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrindFailPre")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindFailPre")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPre")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
set(CTEST_CUSTOM_PRE_MEMCHECK "${ERROR_COMMAND}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyValgrindIgnoreMemcheck)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")
add_test (RunCMakeAgain "${CMAKE_COMMAND}")

View File

@ -0,0 +1,9 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrindIgnoreMemcheck")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrindIgnoreMemcheck")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindIgnoreMemcheck")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindIgnoreMemcheck")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckDummyValgrindPrePost)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrindPrePost")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrindPrePost")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindPrePost")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindPrePost")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
set(CTEST_CUSTOM_PRE_MEMCHECK "${CTEST_MEMORYCHECK_COMMAND}")
set(CTEST_CUSTOM_POST_MEMCHECK "${CTEST_MEMORYCHECK_COMMAND}")
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckNotExist)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckUnknown")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckNotExist")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/NotExist")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/NotExist")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "${CTEST_BINARY_DIRECTORY}/no-memcheck-exe")
CTEST_START(Experimental)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckUnknown)
include(CTest)
add_test (RunCMake "${CMAKE_COMMAND}")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckUnknown")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckUnknown")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/Unknown")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/Unknown")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "@CMAKE_COMMAND@")
CTEST_START(Experimental)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.9)
project(CTestTestMemcheckUnknownQuoted)
include(CTest)
add_test (RunCMake "\"${CMAKE_COMMAND}\"")

View File

@ -0,0 +1,7 @@
set (CTEST_PROJECT_NAME "CTestTestMemcheckUnknownQuoted")
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set (CTEST_DART_SERVER_VERSION "2")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 2.8.9)
# Settings:
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
set(CTEST_SITE "@SITE@")
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckUnknownQuoted")
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/UnknownQuoted")
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/UnknownQuoted")
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
set(CTEST_MEMORYCHECK_COMMAND "@CMAKE_COMMAND@")
CTEST_START(Experimental)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

View File

@ -34,6 +34,15 @@ enum {
#ifdef GE_NOT_DEFINED
#error Expect not defined generator expression
#endif
#ifndef ARGUMENT
#error Expected define expanded from list
#endif
#ifndef LIST
#error Expected define expanded from list
#endif
// TEST_GENERATOR_EXPRESSIONS
#endif
int main(int argc, char **argv)

View File

@ -12,4 +12,5 @@ set_property(TARGET target_prop_executable APPEND PROPERTY COMPILE_DEFINITIONS
TEST_GENERATOR_EXPRESSIONS
"$<1:CMAKE_IS_DECLARATIVE>"
"$<0:GE_NOT_DEFINED>"
"$<1:ARGUMENT;LIST>"
)

View File

@ -44,6 +44,32 @@ add_custom_target(check ALL
-Dtest_strequal_one_empty=$<STREQUAL:something,>
-Dtest_angle_r=$<ANGLE-R>
-Dtest_comma=$<COMMA>
-Dtest_colons_1=$<1::>
-Dtest_colons_2=$<1:::>
-Dtest_colons_3=$<1:Qt5::Core>
-Dtest_colons_4=$<1:C:\\CMake>
-Dtest_colons_5=$<1:C:/CMake>
-Dtest_incomplete_1=$<
-Dtest_incomplete_2=$<something
-Dtest_incomplete_3=$<something:
-Dtest_incomplete_4=$<something:,
-Dtest_incomplete_5=$something:,>
-Dtest_incomplete_6=<something:,>
-Dtest_incomplete_7=$<something::
-Dtest_incomplete_8=$<something:,
-Dtest_incomplete_9=$<something:,,
-Dtest_incomplete_10=$<something:,:
-Dtest_incomplete_11=$<something,,
-Dtest_incomplete_12=$<,,
-Dtest_incomplete_13=$<some$<1:special>thing
-Dtest_incomplete_14=$<$<ANGLE-R>
-Dtest_incomplete_15=$<some$<thing
-Dtest_incomplete_16=$<BOOL:something
-Dtest_incomplete_17=$<1:some$thing>
-Dtest_incomplete_18=$<1:some,thing
-Dtest_incomplete_19=$<1:some,thing$<ANGLE-R>
-Dtest_incomplete_20=$<CONFIGURATION$<ANGLE-R>
-Dtest_incomplete_21=$<BOOL:something$<ANGLE-R>
-P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake
COMMAND ${CMAKE_COMMAND} -E echo "check done"
VERBATIM

View File

@ -45,3 +45,29 @@ check(test_strequal_both_empty "1")
check(test_strequal_one_empty "0")
check(test_angle_r ">")
check(test_comma ",")
check(test_colons_1 ":")
check(test_colons_2 "::")
check(test_colons_3 "Qt5::Core")
check(test_colons_4 "C:\\\\CMake")
check(test_colons_5 "C:/CMake")
check(test_incomplete_1 "$<")
check(test_incomplete_2 "$<something")
check(test_incomplete_3 "$<something:")
check(test_incomplete_4 "$<something:,")
check(test_incomplete_5 "$something:,>")
check(test_incomplete_6 "<something:,>")
check(test_incomplete_7 "$<something::")
check(test_incomplete_8 "$<something:,")
check(test_incomplete_9 "$<something:,,")
check(test_incomplete_10 "$<something:,:")
check(test_incomplete_11 "$<something,,")
check(test_incomplete_12 "$<,,")
check(test_incomplete_13 "$<somespecialthing")
check(test_incomplete_14 "$<>")
check(test_incomplete_15 "$<some$<thing")
check(test_incomplete_16 "$<BOOL:something")
check(test_incomplete_17 "some$thing")
check(test_incomplete_18 "$<1:some,thing")
check(test_incomplete_19 "$<1:some,thing>")
check(test_incomplete_20 "$<CONFIGURATION>")
check(test_incomplete_21 "$<BOOL:something>")

View File

@ -15,6 +15,8 @@ create_header(baz)
create_header(bang)
create_header(bing)
create_header(bung)
create_header(arguments)
create_header(list)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -30,3 +32,5 @@ set_property(TARGET TargetIncludeDirectories APPEND PROPERTY
include_directories("${CMAKE_CURRENT_BINARY_DIR}/baz")
include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/bung>")
include_directories("sing$<1:/ting>")
include_directories("$<1:${CMAKE_CURRENT_BINARY_DIR}/arguments;${CMAKE_CURRENT_BINARY_DIR}/list>")

View File

@ -7,6 +7,8 @@
#include "bing.h"
#include "bung.h"
#include "ting.h"
#include "arguments.h"
#include "list.h"
int main(int, char**)
{

View File

@ -53,6 +53,7 @@ add_RunCMake_test(ObjectLibrary)
add_RunCMake_test(build_command)
add_RunCMake_test(find_package)
add_RunCMake_test(include)
add_RunCMake_test(include_directories)
add_RunCMake_test(list)
if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")

View File

@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 2.8)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,6 @@
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
NotThere1
used as include directory in directory .*
NotThere2
used as include directory in directory .*

View File

@ -0,0 +1,9 @@
include_directories(NotThere1-NOTFOUND)
include_directories($<1:There1-NOTFOUND>)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" "int main(int,char**) { return 0; }\n")
add_executable(dummy "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
set_property(TARGET dummy APPEND PROPERTY INCLUDE_DIRECTORIES "NotThere2-NOTFOUND")
set_property(TARGET dummy APPEND PROPERTY INCLUDE_DIRECTORIES "$<1:There2-NOTFOUND>")

View File

@ -0,0 +1,3 @@
include(RunCMake)
run_cmake(NotFoundContent)