diff options
48 files changed, 319 insertions, 111 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index bee69d9..ddf8b23 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -914,7 +914,7 @@ function(cpack_deb_prepare_package_vars) extract_so_info("${_FILE}" libname soversion) if(libname AND soversion) list(APPEND CPACK_DEBIAN_PACKAGE_SHLIBS_LIST - "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} ${CPACK_PACKAGE_VERSION})") + "${libname} ${soversion} ${CPACK_DEBIAN_PACKAGE_NAME} (${CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY} ${CPACK_DEBIAN_PACKAGE_VERSION})") else() message(AUTHOR_WARNING "Shared library '${_FILE}' is missing soname or soversion. Library will not be added to DEBIAN/shlibs control file.") endif() @@ -967,7 +967,7 @@ function(cpack_deb_prepare_package_vars) # Patch package file name to be in corrent debian format: # <foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb set(CPACK_OUTPUT_FILE_NAME - "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") + "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") else() cmake_policy(PUSH) cmake_policy(SET CMP0010 NEW) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 5021c41..722ee15 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -2473,8 +2473,8 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ # We should generate a USER spec file template: # - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE # - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE + set(RPMBUILD_FLAGS "-bb") if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) - set(RPMBUILD_FLAGS "-bb") file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in "# -*- rpm-spec -*- diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake index 3765079..4783424 100644 --- a/Modules/Compiler/PGI-Fortran.cmake +++ b/Modules/Compiler/PGI-Fortran.cmake @@ -1,6 +1,9 @@ include(Compiler/PGI) __compiler_pgi(Fortran) +set(CMAKE_Fortran_PREPROCESS_SOURCE + "<CMAKE_Fortran_COMPILER> -Mpreprocess <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") + set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform") diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index e6bf3dc..266d135 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -742,6 +742,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 106300 AND Boost_VERSION VERSION_LESS 106400) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_RANDOM_DEPENDENCIES system) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) else() message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}") set(_Boost_IMPORTED_TARGETS FALSE) @@ -877,7 +892,7 @@ endfunction() # This function would append corresponding directories if MSVC is a current compiler, # so having `BOOST_ROOT` would be enough to specify to find everything. # -macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) +macro(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar basedir) if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_arch_suffix 64) @@ -885,19 +900,19 @@ macro(_Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS componentlibvar base set(_arch_suffix 32) endif() if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-15.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-15.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-14.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-12.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-11.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-10.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-9.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0) elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) - list(APPEND ${componentlibvar} ${${basedir}}/lib${_arch_suffix}-msvc-8.0) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0) endif() endif() endmacro() @@ -948,7 +963,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1" @@ -1361,10 +1376,10 @@ foreach(c DEBUG RELEASE) if(BOOST_ROOT) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${BOOST_ROOT}/lib ${BOOST_ROOT}/stage/lib) - _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} BOOST_ROOT) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${BOOST_ROOT}") elseif(_ENV_BOOST_ROOT) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} ${_ENV_BOOST_ROOT}/lib ${_ENV_BOOST_ROOT}/stage/lib) - _Boost_UPDATE_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} _ENV_BOOST_ROOT) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${_ENV_BOOST_ROOT}") endif() list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} @@ -1372,6 +1387,7 @@ foreach(c DEBUG RELEASE) ${Boost_INCLUDE_DIR}/../lib ${Boost_INCLUDE_DIR}/stage/lib ) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "${Boost_INCLUDE_DIR}/..") if( Boost_NO_SYSTEM_PATHS ) list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) else() @@ -1380,6 +1396,7 @@ foreach(c DEBUG RELEASE) C:/boost /sw/local/lib ) + _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/boost") endif() endif() endforeach() diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 76ab716..6540171 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -49,8 +49,8 @@ # The root directory of the Google Test installation (may also be # set as an environment variable) # ``GTEST_MSVC_SEARCH`` -# If compiling with MSVC, this variable can be set to ``MD`` or -# ``MT`` (the default) to enable searching a GTest build tree +# If compiling with MSVC, this variable can be set to ``MT`` or +# ``MD`` (the default) to enable searching a GTest build tree # # # Example usage @@ -160,11 +160,17 @@ if(MSVC) if(GTEST_MSVC_SEARCH STREQUAL "MD") list(APPEND _gtest_libpath_suffixes msvc/gtest-md/Debug - msvc/gtest-md/Release) + msvc/gtest-md/Release + msvc/x64/Debug + msvc/x64/Release + ) elseif(GTEST_MSVC_SEARCH STREQUAL "MT") list(APPEND _gtest_libpath_suffixes msvc/gtest/Debug - msvc/gtest/Release) + msvc/gtest/Release + msvc/x64/Debug + msvc/x64/Release + ) endif() endif() diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 30fc5c6..6259ce1 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -204,7 +204,6 @@ if(WIN32 AND NOT CYGWIN) SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE) set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) # same player, for MinGW set(LIB_EAY_NAMES crypto libeay32) @@ -232,7 +231,6 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(SSL_EAY LIB_EAY) set(OPENSSL_SSL_LIBRARY ${SSL_EAY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) unset(LIB_EAY_NAMES) unset(SSL_EAY_NAMES) else() @@ -264,7 +262,6 @@ if(WIN32 AND NOT CYGWIN) mark_as_advanced(SSL_EAY LIB_EAY) set(OPENSSL_SSL_LIBRARY ${SSL_EAY} ) set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY} ) - set(OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) endif() else() @@ -298,8 +295,6 @@ else() set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY}) set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) - set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) - endif() function(from_hex HEX DEC) @@ -371,10 +366,13 @@ endif () include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ) + if (OPENSSL_VERSION) find_package_handle_standard_args(OpenSSL REQUIRED_VARS - OPENSSL_LIBRARIES + OPENSSL_SSL_LIBRARY + OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR VERSION_VAR OPENSSL_VERSION @@ -383,7 +381,8 @@ if (OPENSSL_VERSION) ) else () find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR" - OPENSSL_LIBRARIES + OPENSSL_SSL_LIBRARY + OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR ) endif () diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 874128c..9e2194c 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -88,8 +88,13 @@ foreach(suffix ${PostgreSQL_KNOWN_VERSIONS}) "PostgreSQL/${suffix}/include/server") endif() if(UNIX) + list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/lib") + list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/include") list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES - "postgresql/${suffix}/server") + "postgresql/${suffix}/server" + "pgsql-${suffix}/include/server") endif() endforeach() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ae9c31e..a5a07dc 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 7) -set(CMake_VERSION_PATCH 20161216) +set(CMake_VERSION_PATCH 20170111) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 36566a4..5c50da8 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -173,7 +173,11 @@ int cmCPackDebGenerator::PackageComponentsAllInOne( std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + this->GetOutputExtension()); // all GROUP in one vs all COMPONENT in one - localToplevel += "/" + compInstDirName; + // if must be here otherwise non component paths have a trailing / while + // components don't + if (!compInstDirName.empty()) { + localToplevel += "/" + compInstDirName; + } /* replace the TEMP DIRECTORY with the component one */ this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str()); diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx index 1512166..abed70e 100644 --- a/Source/QtDialog/RegexExplorer.cxx +++ b/Source/QtDialog/RegexExplorer.cxx @@ -64,10 +64,32 @@ void RegexExplorer::on_inputText_textChanged() return; } + std::string matchingText; + + if (matchAll->isChecked()) { + const char* p = m_text.c_str(); + while (m_regexParser.find(p)) { + std::string::size_type l = m_regexParser.start(); + std::string::size_type r = m_regexParser.end(); + if (r - l == 0) { + // matched empty string + clearMatch(); + return; + } + if (!matchingText.empty()) { + matchingText += ";"; + } + matchingText += std::string(p + l, r - l); + p += r; + } + } else { + matchingText = m_regexParser.match(0); + } + #ifdef QT_NO_STL - QString matchText = m_regexParser.match(0).c_str(); + QString matchText = matchingText.c_str(); #else - QString matchText = QString::fromStdString(m_regexParser.match(0)); + QString matchText = QString::fromStdString(matchingText); #endif match0->setPlainText(matchText); @@ -95,8 +117,16 @@ void RegexExplorer::on_matchNumber_currentIndexChanged(int index) matchN->setPlainText(match); } +void RegexExplorer::on_matchAll_toggled(bool checked) +{ + Q_UNUSED(checked); + + on_inputText_textChanged(); +} + void RegexExplorer::clearMatch() { + m_matched = false; match0->clear(); matchN->clear(); } diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h index f1c1e5f..caef975 100644 --- a/Source/QtDialog/RegexExplorer.h +++ b/Source/QtDialog/RegexExplorer.h @@ -22,6 +22,7 @@ private slots: void on_regularExpression_textChanged(const QString& text); void on_inputText_textChanged(); void on_matchNumber_currentIndexChanged(int index); + void on_matchAll_toggled(bool checked); private: static void setStatusColor(QWidget* widget, bool successful); diff --git a/Source/QtDialog/RegexExplorer.ui b/Source/QtDialog/RegexExplorer.ui index 2c2d761..0af6999 100644 --- a/Source/QtDialog/RegexExplorer.ui +++ b/Source/QtDialog/RegexExplorer.ui @@ -104,11 +104,38 @@ <widget class="QLineEdit" name="regularExpression"/> </item> <item> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Complete Match</string> - </property> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Complete Match</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QCheckBox" name="matchAll"> + <property name="text"> + <string>Match All</string> + </property> + </widget> + </item> + </layout> </item> <item> <widget class="QPlainTextEdit" name="match0"> diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 736aa91..96535eb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1977,6 +1977,22 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, buildSettings->AddAttribute("HEADER_SEARCH_PATHS", dirs.CreateList()); } + if (this->XcodeVersion >= 60) { + // Add those per-language flags in addition to HEADER_SEARCH_PATHS to gain + // system include directory awareness. We need to also keep on setting + // HEADER_SEARCH_PATHS to work around a missing compile options flag for + // GNU assembly files (#16449) + for (std::set<std::string>::iterator li = languages.begin(); + li != languages.end(); ++li) { + std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags( + includes, gtgt, *li, true, false, configName); + + if (!includeFlags.empty()) { + cflags[*li] += " " + includeFlags; + } + } + } + bool same_gflags = true; std::map<std::string, std::string> gflags; std::string const* last_gflag = 0; diff --git a/Source/cmLocale.h b/Source/cmLocale.h index e8e751d..cca7cf5 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -6,10 +6,11 @@ #include <cmConfigure.h> #include <locale.h> +#include <string> class cmLocaleRAII { - const char* OldLocale; + std::string OldLocale; public: cmLocaleRAII() @@ -17,7 +18,7 @@ public: { setlocale(LC_CTYPE, ""); } - ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale); } + ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); } }; #endif diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fccb486..cfc0495 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2215,7 +2215,7 @@ const char* cmMakefile::GetRequiredDefinition(const std::string& name) const const char* ret = this->GetDefinition(name); if (!ret) { cmSystemTools::Error("Error required internal CMake variable not " - "set, cmake may be not be built correctly.\n", + "set, cmake may not be built correctly.\n", "Missing variable is:\n", name.c_str()); return ""; } diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index f47cb33..334a05a 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -731,12 +731,16 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, Json::Value result = Json::objectValue; result[kNAME_KEY] = target->GetName(); - result[kTYPE_KEY] = typeName; - result[kFULL_NAME_KEY] = target->GetFullName(config); result[kSOURCE_DIRECTORY_KEY] = lg->GetCurrentSourceDirectory(); result[kBUILD_DIRECTORY_KEY] = lg->GetCurrentBinaryDirectory(); + if (type == cmStateEnums::INTERFACE_LIBRARY) { + return result; + } + + result[kFULL_NAME_KEY] = target->GetFullName(config); + if (target->HaveWellDefinedOutputFiles()) { Json::Value artifacts = Json::arrayValue; artifacts.append(target->GetFullPath(config, false)); @@ -997,6 +1001,8 @@ cmServerResponse cmServerProtocol1_0::ProcessConfigure( } } + cmSystemTools::ResetErrorOccuredFlag(); // Reset error state + if (cm->AddCMakePaths() != 1) { return request.ReportError("Failed to set CMake paths."); } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ee4ff39..9261ca8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -858,6 +858,12 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } + if (prop == "TYPE") { + std::ostringstream e; + e << "TYPE property is read-only\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 4920582..db18462 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -3,7 +3,9 @@ project(IncludeDirectories) if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4) OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) - AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja")) + AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" + OR CMAKE_GENERATOR STREQUAL "Ninja" + OR (CMAKE_GENERATOR STREQUAL "Xcode" AND NOT XCODE_VERSION VERSION_LESS 6.0))) include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wunused-variable run_sys_includes_test) if(run_sys_includes_test) diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt index dcee85e..5078f30 100644 --- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt @@ -15,10 +15,17 @@ target_include_directories(upstream SYSTEM PUBLIC ) add_library(config_specific INTERFACE) -set(testConfig ${CMAKE_BUILD_TYPE}) -target_include_directories(config_specific SYSTEM INTERFACE - "$<$<CONFIG:${testConfig}>:${CMAKE_CURRENT_SOURCE_DIR}/config_specific>" -) +if(CMAKE_GENERATOR STREQUAL "Xcode") + # CMAKE_BUILD_TYPE does not work here for multi-config generators + target_include_directories(config_specific SYSTEM INTERFACE + "${CMAKE_CURRENT_SOURCE_DIR}/config_specific" + ) +else() + set(testConfig ${CMAKE_BUILD_TYPE}) + target_include_directories(config_specific SYSTEM INTERFACE + "$<$<CONFIG:${testConfig}>:${CMAKE_CURRENT_SOURCE_DIR}/config_specific>" + ) +endif() add_library(consumer consumer.cpp) target_link_libraries(consumer upstream config_specific) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index adfd37d..d2465c4 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -345,7 +345,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") add_RunCMake_test(CompilerLauncher) endif() -add_RunCMake_test_group(CPack "DEB;RPM;TGZ") +add_RunCMake_test_group(CPack "DEB;RPM;7Z;TBZ2;TGZ;TXZ;TZ;ZIP") # add a test to make sure symbols are exported from a shared library # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used add_RunCMake_test(AutoExportDll) diff --git a/Tests/RunCMake/CPack/7Z/Helpers.cmake b/Tests/RunCMake/CPack/7Z/Helpers.cmake new file mode 100644 index 0000000..f256a42 --- /dev/null +++ b/Tests/RunCMake/CPack/7Z/Helpers.cmake @@ -0,0 +1,3 @@ +set(cpack_archive_extension_ "7z") + +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/7Z/Prerequirements.cmake b/Tests/RunCMake/CPack/7Z/Prerequirements.cmake new file mode 100644 index 0000000..dbaf682 --- /dev/null +++ b/Tests/RunCMake/CPack/7Z/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/7Z/packaging_COMPONENT_default.cmake b/Tests/RunCMake/CPack/7Z/packaging_COMPONENT_default.cmake new file mode 100644 index 0000000..81a5035 --- /dev/null +++ b/Tests/RunCMake/CPack/7Z/packaging_COMPONENT_default.cmake @@ -0,0 +1 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake b/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake new file mode 100644 index 0000000..ce039f5 --- /dev/null +++ b/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake @@ -0,0 +1,62 @@ +set(ALL_FILES_GLOB "*.${cpack_archive_extension_}") + +function(getPackageContent FILE RESULT_VAR) + # TODO for some types this only works because libarchive handles it... (not + # part of for e.g. gnu tar) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xtf ${FILE} + OUTPUT_VARIABLE package_content_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) +endfunction() + +function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO RESULT_VAR) + if(COMPONENT) + set(COMPONENT "-${COMPONENT}") + endif() + + set(${RESULT_VAR} + "${NAME}-${VERSION}-*${COMPONENT}.${cpack_archive_extension_}" PARENT_SCOPE) +endfunction() + +function(getPackageContentList FILE RESULT_VAR) + getPackageContent("${FILE}" package_content_) + + string(REPLACE "\n" ";" package_content_ "${package_content_}") + foreach(i_ IN LISTS package_content_) + string(REGEX REPLACE "/$" "" result_ "${i_}") + list(APPEND items_ "${result_}") + endforeach() + + set(${RESULT_VAR} "${items_}" PARENT_SCOPE) +endfunction() + +function(toExpectedContentList FILE_NO CONTENT_VAR) + findExpectedFile("${FILE_NO}" "file_") + + # component and monolithic packages differ for some reason by either having + # package filename prefix in path or not + if(PACKAGING_TYPE STREQUAL "MONOLITHIC") + get_filename_component(prefix_ "${file_}" NAME) + # NAME_WE removes everything after the dot and dot is in version so replace instead + string(REPLACE ".${cpack_archive_extension_}" "/" prefix_ "${prefix_}") + else() + unset(prefix_) + endif() + + if(NOT DEFINED TEST_MAIN_INSTALL_PREFIX_PATH) + set(TEST_MAIN_INSTALL_PREFIX_PATH "/usr") + endif() + + unset(filtered_) + foreach(part_ IN LISTS ${CONTENT_VAR}) + string(REGEX REPLACE "^${TEST_MAIN_INSTALL_PREFIX_PATH}(/|$)" "" part_ "${part_}") + + if(part_) + list(APPEND filtered_ "${prefix_}${part_}") + endif() + endforeach() + + set(${CONTENT_VAR} "${filtered_}" PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index 89da610..f883c69 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -60,7 +60,11 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK ) foreach(o out err) - if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") + elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${PACKAGING_TYPE}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index f51d254..7c98f69 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -155,8 +155,18 @@ VerifyResult.cmake script also automatically prints out standard output and standard error from CPack execution phase that is compared with '<test_name>/<generator_name>-stdout.txt' regular expression and and '<test_name>/<generator_name>-stderr.txt' regular expresson respectively. -NOTE: For subtests generator name can also be suffixed with subtest name and in - such case subtest file is preferred. +NOTE: For subtests generator name can also be suffixed with subtest name and/or + packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the + preferences of which file will be used are as follows: + - generator name + packaging type + subtest name + - generator name + packaging type + - generator name + subtest name + - generator name + - default generator + File name format: '<generator_name>-<packaging_type>-<subtest_name>-std<type>.txt' + where <type> can either be 'out' or 'err'. + File name format: '<generator_name>-<packaging_type>-std<type>.txt' + where <type> can either be 'out' or 'err'. File name format: '<generator_name>-<subtest_name>-std<type>.txt' where <type> can either be 'out' or 'err'. NOTE: If none of the comparison files are present then the default generator @@ -223,3 +233,4 @@ To add a new generator we must - if needed add 'default_expected_std<type>.txt' files where <type> is either 'out' or 'err' which will contain default expected output of package generation regular expression. +- add generator to list of other CPack generators in RunCMake/CMakeLists.txt diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 3077340..af44182 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -15,7 +15,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true "COMPONENT") run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT") run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC") run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT") -run_cpack_test(MINIMAL "RPM;DEB;TGZ" false "MONOLITHIC") +run_cpack_test(MINIMAL "RPM;DEB;7Z;TBZ2;TGZ;TXZ;TZ;ZIP" false "MONOLITHIC;COMPONENT") run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC") run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT") run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false "COMPONENT") @@ -23,3 +23,4 @@ run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component;one_component;one_co run_cpack_source_test(SOURCE_PACKAGE "RPM") run_cpack_test(SUGGESTS "RPM" false "MONOLITHIC") run_cpack_test(USER_FILELIST "RPM" false "MONOLITHIC") +run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT") diff --git a/Tests/RunCMake/CPack/TBZ2/Helpers.cmake b/Tests/RunCMake/CPack/TBZ2/Helpers.cmake new file mode 100644 index 0000000..292b691 --- /dev/null +++ b/Tests/RunCMake/CPack/TBZ2/Helpers.cmake @@ -0,0 +1,3 @@ +set(cpack_archive_extension_ "tar.bz2") + +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/TBZ2/Prerequirements.cmake b/Tests/RunCMake/CPack/TBZ2/Prerequirements.cmake new file mode 100644 index 0000000..dbaf682 --- /dev/null +++ b/Tests/RunCMake/CPack/TBZ2/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/TBZ2/packaging_COMPONENT_default.cmake b/Tests/RunCMake/CPack/TBZ2/packaging_COMPONENT_default.cmake new file mode 100644 index 0000000..81a5035 --- /dev/null +++ b/Tests/RunCMake/CPack/TBZ2/packaging_COMPONENT_default.cmake @@ -0,0 +1 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/TGZ/Helpers.cmake b/Tests/RunCMake/CPack/TGZ/Helpers.cmake index 4a194c6..4357a59 100644 --- a/Tests/RunCMake/CPack/TGZ/Helpers.cmake +++ b/Tests/RunCMake/CPack/TGZ/Helpers.cmake @@ -1,62 +1,3 @@ -set(ALL_FILES_GLOB "*.tar.gz") +set(cpack_archive_extension_ "tar.gz") -function(getPackageContent FILE RESULT_VAR) - execute_process(COMMAND ${CMAKE_COMMAND} -E tar -ztvf ${FILE} - OUTPUT_VARIABLE package_content_ - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - - set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) -endfunction() - -function(getPackageNameGlobexpr NAME COMPONENT VERSION REVISION FILE_NO RESULT_VAR) - if(COMPONENT) - set(COMPONENT "-${COMPONENT}") - endif() - - set(${RESULT_VAR} "${NAME}-${VERSION}-*${COMPONENT}.tar.gz" PARENT_SCOPE) -endfunction() - -function(getPackageContentList FILE RESULT_VAR) - execute_process(COMMAND ${CMAKE_COMMAND} -E tar -ztf ${FILE} - OUTPUT_VARIABLE package_content_ - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - - string(REPLACE "\n" ";" package_content_ "${package_content_}") - foreach(i_ IN LISTS package_content_) - string(REGEX REPLACE "/$" "" result_ "${i_}") - list(APPEND items_ "${result_}") - endforeach() - - set(${RESULT_VAR} "${items_}" PARENT_SCOPE) -endfunction() - -function(toExpectedContentList FILE_NO CONTENT_VAR) - findExpectedFile("${FILE_NO}" "file_") - - # component and monolithic packages differ for some reason by either having - # package filename prefix in path or not - if(PACKAGING_TYPE STREQUAL "MONOLITHIC") - get_filename_component(prefix_ "${file_}" NAME) - # NAME_WE removes everything after the dot and dot is in version so replace instead - string(REPLACE ".tar.gz" "/" prefix_ "${prefix_}") - else() - unset(prefix_) - endif() - - if(NOT DEFINED TEST_MAIN_INSTALL_PREFIX_PATH) - set(TEST_MAIN_INSTALL_PREFIX_PATH "/usr") - endif() - - unset(filtered_) - foreach(part_ IN LISTS ${CONTENT_VAR}) - string(REGEX REPLACE "^${TEST_MAIN_INSTALL_PREFIX_PATH}(/|$)" "" part_ "${part_}") - - if(part_) - list(APPEND filtered_ "${prefix_}${part_}") - endif() - endforeach() - - set(${CONTENT_VAR} "${filtered_}" PARENT_SCOPE) -endfunction() +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/TXZ/Helpers.cmake b/Tests/RunCMake/CPack/TXZ/Helpers.cmake new file mode 100644 index 0000000..f390cb4 --- /dev/null +++ b/Tests/RunCMake/CPack/TXZ/Helpers.cmake @@ -0,0 +1,3 @@ +set(cpack_archive_extension_ "tar.xz") + +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/TXZ/Prerequirements.cmake b/Tests/RunCMake/CPack/TXZ/Prerequirements.cmake new file mode 100644 index 0000000..dbaf682 --- /dev/null +++ b/Tests/RunCMake/CPack/TXZ/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/TXZ/packaging_COMPONENT_default.cmake b/Tests/RunCMake/CPack/TXZ/packaging_COMPONENT_default.cmake new file mode 100644 index 0000000..81a5035 --- /dev/null +++ b/Tests/RunCMake/CPack/TXZ/packaging_COMPONENT_default.cmake @@ -0,0 +1 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/TZ/Helpers.cmake b/Tests/RunCMake/CPack/TZ/Helpers.cmake new file mode 100644 index 0000000..117cd24 --- /dev/null +++ b/Tests/RunCMake/CPack/TZ/Helpers.cmake @@ -0,0 +1,3 @@ +set(cpack_archive_extension_ "tar.Z") + +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/TZ/Prerequirements.cmake b/Tests/RunCMake/CPack/TZ/Prerequirements.cmake new file mode 100644 index 0000000..dbaf682 --- /dev/null +++ b/Tests/RunCMake/CPack/TZ/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/TZ/packaging_COMPONENT_default.cmake b/Tests/RunCMake/CPack/TZ/packaging_COMPONENT_default.cmake new file mode 100644 index 0000000..81a5035 --- /dev/null +++ b/Tests/RunCMake/CPack/TZ/packaging_COMPONENT_default.cmake @@ -0,0 +1 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/ZIP/Helpers.cmake b/Tests/RunCMake/CPack/ZIP/Helpers.cmake new file mode 100644 index 0000000..3710bcf --- /dev/null +++ b/Tests/RunCMake/CPack/ZIP/Helpers.cmake @@ -0,0 +1,3 @@ +set(cpack_archive_extension_ "zip") + +include("${CMAKE_CURRENT_LIST_DIR}/../ArchiveCommon/common_helpers.cmake") diff --git a/Tests/RunCMake/CPack/ZIP/Prerequirements.cmake b/Tests/RunCMake/CPack/ZIP/Prerequirements.cmake new file mode 100644 index 0000000..dbaf682 --- /dev/null +++ b/Tests/RunCMake/CPack/ZIP/Prerequirements.cmake @@ -0,0 +1,4 @@ +function(get_test_prerequirements found_var config_file) + file(WRITE "${config_file}" "") + set(${found_var} true PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/ZIP/packaging_COMPONENT_default.cmake b/Tests/RunCMake/CPack/ZIP/packaging_COMPONENT_default.cmake new file mode 100644 index 0000000..81a5035 --- /dev/null +++ b/Tests/RunCMake/CPack/ZIP/packaging_COMPONENT_default.cmake @@ -0,0 +1 @@ +set(CPACK_ARCHIVE_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake new file mode 100644 index 0000000..6142eb3 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake @@ -0,0 +1,2 @@ +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake new file mode 100644 index 0000000..fbdda9c --- /dev/null +++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake @@ -0,0 +1,3 @@ +set(whitespaces_ "[\t\n\r ]*") +set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$") +verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums") diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake new file mode 100644 index 0000000..15c5892 --- /dev/null +++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake @@ -0,0 +1,5 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(CPACK_COMPONENTS_ALL test) +endif() diff --git a/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake b/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake index 83ed0f2..15c5892 100644 --- a/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake +++ b/Tests/RunCMake/CPack/tests/MINIMAL/test.cmake @@ -1 +1,5 @@ install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(CPACK_COMPONENTS_ALL test) +endif() diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake index 37c7124..1ddacee 100644 --- a/Tests/RunCMake/set_property/RunCMakeTest.cmake +++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake @@ -6,4 +6,5 @@ run_cmake(COMPILE_OPTIONS) run_cmake(INCLUDE_DIRECTORIES) run_cmake(LINK_LIBRARIES) run_cmake(SOURCES) +run_cmake(TYPE) run_cmake(USER_PROP) diff --git a/Tests/RunCMake/set_property/TYPE-result.txt b/Tests/RunCMake/set_property/TYPE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/set_property/TYPE-stderr.txt b/Tests/RunCMake/set_property/TYPE-stderr.txt new file mode 100644 index 0000000..fbc8653 --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE-stderr.txt @@ -0,0 +1 @@ +TYPE property is read-only diff --git a/Tests/RunCMake/set_property/TYPE.cmake b/Tests/RunCMake/set_property/TYPE.cmake new file mode 100644 index 0000000..8481266 --- /dev/null +++ b/Tests/RunCMake/set_property/TYPE.cmake @@ -0,0 +1,2 @@ +add_custom_target(CustomTarget) +set_property(TARGET CustomTarget PROPERTY TYPE foo) |