This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 268f97a02a305e63df46187b2210c0a764052498 (commit) via 381e35c0d27605177c04fcbb3ca05b6170a64997 (commit) via ecef8fbdbeb770b88bfcb8c6e0fd94a2fcb3a12c (commit) from 5cd8e1fdb5ca0e83ec2970dccbece9c50e2db31f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=268f97a02a305e63df46187b2210c0a764052498 commit 268f97a02a305e63df46187b2210c0a764052498 Merge: 5cd8e1f 381e35c Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 27 10:15:15 2013 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Jun 27 10:15:15 2013 -0400 Merge topic 'compiler-version-genex' into next 381e35c Revert "Escape individual COMPILE_OPTIONS entries." ecef8fb Revert "Add generator expressions for compiler versions." http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=381e35c0d27605177c04fcbb3ca05b6170a64997 commit 381e35c0d27605177c04fcbb3ca05b6170a64997 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 27 10:12:06 2013 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 27 10:12:06 2013 -0400 Revert "Escape individual COMPILE_OPTIONS entries." This reverts commit b528f1c41b51d62c0dbdcddbdd0f3266ccb35506. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4e2b9af..684c3c4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1354,7 +1354,7 @@ void cmLocalGenerator::GetCompileOptions(std::string& flags, for(std::vector<std::string>::const_iterator li = opts.begin(); li != opts.end(); ++li) { - this->AppendFlags(flags, this->EscapeForShell(li->c_str()).c_str()); + this->AppendFlags(flags, li->c_str()); } } diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 8a14006..6d8a96a 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -5,7 +5,7 @@ project(CompileOptions) add_library(testlib other.cpp) add_executable(CompileOptions main.cpp) -set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE>" "$<$<CXX_COMPILER_ID:GNU>:-DNEEDS_ESCAPE=\"E$CAPE\">") +set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE>") target_link_libraries(CompileOptions testlib) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp index 5d555ca..0d39050 100644 --- a/Tests/CompileOptions/main.cpp +++ b/Tests/CompileOptions/main.cpp @@ -5,12 +5,7 @@ # endif #endif -#include <cstring> - int main(int argc, char **argv) { -#ifdef DO_GNU_TESTS - return strcmp(NEEDS_ESCAPE, "E$CAPE") == 0 ? 0 : 1; -#endif return 0; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecef8fbdbeb770b88bfcb8c6e0fd94a2fcb3a12c commit ecef8fbdbeb770b88bfcb8c6e0fd94a2fcb3a12c Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Jun 27 10:12:01 2013 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jun 27 10:12:01 2013 -0400 Revert "Add generator expressions for compiler versions." This reverts commit 166bbb6636778167f9a94fbbc6a818bba388a236. diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h index 4caaabf..7358a36 100644 --- a/Source/cmDocumentGeneratorExpressions.h +++ b/Source/cmDocumentGeneratorExpressions.h @@ -54,14 +54,6 @@ "else '0'.\n" \ " $<VERSION_EQUAL:v1,v2> = '1' if v1 is the same version as v2, " \ "else '0'.\n" \ - " $<C_COMPILER_VERSION> = The CMake-id of the C compiler " \ - "used.\n" \ - " $<C_COMPILER_VERSION:ver> = '1' if the CMake-id of the C " \ - "compiler matches ver, otherwise '0'.\n" \ - " $<CXX_COMPILER_VERSION> = The CMake-id of the CXX compiler " \ - "used.\n" \ - " $<CXX_COMPILER_VERSION:ver> = '1' if the CMake-id of the CXX " \ - "compiler matches ver, otherwise '0'.\n" \ " $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \ " $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \ " $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \ diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 72927db..037ef31 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -396,101 +396,6 @@ static const struct VersionEqualNode : public cmGeneratorExpressionNode } versionEqualNode; //---------------------------------------------------------------------------- -struct CompilerVersionNode : public cmGeneratorExpressionNode -{ - CompilerVersionNode() {} - - virtual int NumExpectedParameters() const { return ZeroOrMoreParameters; } - - std::string EvaluateWithLanguage(const std::vector<std::string> ¶meters, - cmGeneratorExpressionContext *context, - const GeneratorExpressionContent *content, - cmGeneratorExpressionDAGChecker *, - const std::string &lang) const - { - const char *compilerVersion = context->Makefile ? - context->Makefile->GetSafeDefinition(( - "CMAKE_" + lang + "_COMPILER_VERSION").c_str()) : ""; - if (parameters.size() == 0) - { - return compilerVersion ? compilerVersion : ""; - } - - cmsys::RegularExpression compilerIdValidator; - compilerIdValidator.compile("^[0-9\\.]*$"); - if (!compilerIdValidator.find(parameters.begin()->c_str())) - { - reportError(context, content->GetOriginalExpression(), - "Expression syntax not recognized."); - return std::string(); - } - if (!compilerVersion) - { - return parameters.front().empty() ? "1" : "0"; - } - - return cmSystemTools::VersionCompare(cmSystemTools::OP_EQUAL, - parameters.begin()->c_str(), - compilerVersion) ? "1" : "0"; - } -}; - -//---------------------------------------------------------------------------- -static const struct CCompilerVersionNode : public CompilerVersionNode -{ - CCompilerVersionNode() {} - - std::string Evaluate(const std::vector<std::string> ¶meters, - cmGeneratorExpressionContext *context, - const GeneratorExpressionContent *content, - cmGeneratorExpressionDAGChecker *dagChecker) const - { - if (parameters.size() != 0 && parameters.size() != 1) - { - reportError(context, content->GetOriginalExpression(), - "$<C_COMPILER_VERSION> expression requires one or two parameters"); - return std::string(); - } - if (!context->HeadTarget) - { - reportError(context, content->GetOriginalExpression(), - "$<C_COMPILER_VERSION> may only be used with targets. It may not " - "be used with add_custom_command."); - } - return this->EvaluateWithLanguage(parameters, context, content, - dagChecker, "C"); - } -} cCompilerVersionNode; - -//---------------------------------------------------------------------------- -static const struct CxxCompilerVersionNode : public CompilerVersionNode -{ - CxxCompilerVersionNode() {} - - std::string Evaluate(const std::vector<std::string> ¶meters, - cmGeneratorExpressionContext *context, - const GeneratorExpressionContent *content, - cmGeneratorExpressionDAGChecker *dagChecker) const - { - if (parameters.size() != 0 && parameters.size() != 1) - { - reportError(context, content->GetOriginalExpression(), - "$<CXX_COMPILER_VERSION> expression requires one or two " - "parameters"); - return std::string(); - } - if (!context->HeadTarget) - { - reportError(context, content->GetOriginalExpression(), - "$<CXX_COMPILER_VERSION> may only be used with targets. It may " - "not be used with add_custom_command."); - } - return this->EvaluateWithLanguage(parameters, context, content, - dagChecker, "CXX"); - } -} cxxCompilerVersionNode; - -//---------------------------------------------------------------------------- static const struct ConfigurationNode : public cmGeneratorExpressionNode { ConfigurationNode() {} @@ -1342,10 +1247,6 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier) return &versionLessNode; else if (identifier == "VERSION_EQUAL") return &versionEqualNode; - else if (identifier == "C_COMPILER_VERSION") - return &cCompilerVersionNode; - else if (identifier == "CXX_COMPILER_VERSION") - return &cxxCompilerVersionNode; else if (identifier == "CONFIGURATION") return &configurationNode; else if (identifier == "CONFIG") diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 5705e51..8a14006 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -5,29 +5,12 @@ project(CompileOptions) add_library(testlib other.cpp) add_executable(CompileOptions main.cpp) - -macro(get_compiler_test_genex string lang) - set(${string} "-DTEST_${lang}_COMPILER_VERSION=\"$<${lang}_COMPILER_VERSION>\"") - set(${string} "${${string}};-DTEST_${lang}_COMPILER_VERSION_EQUALITY=$<${lang}_COMPILER_VERSION:${CMAKE_${lang}_COMPILER_VERSION}>") -endmacro() - -get_compiler_test_genex(c_tests C) -get_compiler_test_genex(cxx_tests CXX) - -set_property(TARGET CompileOptions PROPERTY - COMPILE_OPTIONS - "$<$<CXX_COMPILER_ID:GNU>:-DNEEDS_ESCAPE=\"E$CAPE\">" - "$<$<C_COMPILER_ID:GNU>:${c_tests}>" - "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE;${cxx_tests}>" -) - +set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE>" "$<$<CXX_COMPILER_ID:GNU>:-DNEEDS_ESCAPE=\"E$CAPE\">") target_link_libraries(CompileOptions testlib) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") target_compile_definitions(CompileOptions PRIVATE "DO_GNU_TESTS" - "EXPECTED_C_COMPILER_VERSION=\"${CMAKE_C_COMPILER_VERSION}\"" - "EXPECTED_CXX_COMPILER_VERSION=\"${CMAKE_CXX_COMPILER_VERSION}\"" ) endif() diff --git a/Tests/CompileOptions/main.cpp b/Tests/CompileOptions/main.cpp index c938c4c..5d555ca 100644 --- a/Tests/CompileOptions/main.cpp +++ b/Tests/CompileOptions/main.cpp @@ -10,11 +10,7 @@ int main(int argc, char **argv) { #ifdef DO_GNU_TESTS - return (strcmp(NEEDS_ESCAPE, "E$CAPE") == 0 - && strcmp(EXPECTED_C_COMPILER_VERSION, TEST_C_COMPILER_VERSION) == 0 - && strcmp(EXPECTED_CXX_COMPILER_VERSION, TEST_CXX_COMPILER_VERSION) == 0 - && TEST_C_COMPILER_VERSION_EQUALITY == 1 - && TEST_CXX_COMPILER_VERSION_EQUALITY == 1) ? 0 : 1; + return strcmp(NEEDS_ESCAPE, "E$CAPE") == 0 ? 0 : 1; #endif return 0; } ----------------------------------------------------------------------- Summary of changes: Source/cmDocumentGeneratorExpressions.h | 8 --- Source/cmGeneratorExpressionEvaluator.cxx | 99 ----------------------------- Source/cmLocalGenerator.cxx | 2 +- Tests/CompileOptions/CMakeLists.txt | 19 +----- Tests/CompileOptions/main.cpp | 9 --- 5 files changed, 2 insertions(+), 135 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits