diff options
-rw-r--r-- | Modules/FindOpenSSL.cmake | 40 | ||||
-rw-r--r-- | Modules/FindPkgConfig.cmake | 6 | ||||
-rw-r--r-- | Modules/FindProtobuf.cmake | 13 | ||||
-rw-r--r-- | Modules/FindPythonInterp.cmake | 55 | ||||
-rw-r--r-- | Source/cmInstallCommand.cxx | 196 | ||||
-rw-r--r-- | Source/cmInstallCommand.h | 4 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/depC.cpp | 2 | ||||
-rw-r--r-- | Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 39 | ||||
-rw-r--r-- | Tests/CMakeOnly/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp | 2 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/override_symbol/main.cpp | 2 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/override_symbol/someclass.cpp | 2 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/prefix/main.cpp | 2 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/prefix/useprefixclass.cpp | 2 | ||||
-rw-r--r-- | Utilities/Release/dashmacmini2_release.cmake | 4 |
16 files changed, 244 insertions, 129 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index af799d6..0750592 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -7,7 +7,7 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# OPENSSL_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8) +# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s) #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -216,16 +216,40 @@ ELSE(WIN32 AND NOT CYGWIN) ENDIF(WIN32 AND NOT CYGWIN) if (OPENSSL_INCLUDE_DIR) - file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*") + if (_OPENSSL_VERSION) + set(OPENSSL_VERSION "${_OPENSSL_VERSION}") + elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") + file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str + REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") - string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1" OPENSSL_VERSION_MAJOR "${openssl_version_str}") - string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1" OPENSSL_VERSION_MINOR "${openssl_version_str}") - string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" OPENSSL_VERSION_PATCH "${openssl_version_str}") + # The version number is encoded as 0xMNNFFPPS: major minor fix patch status + # The status gives if this is a developer or prerelease and is ignored here. + # Major, minor, and fix directly translate into the version numbers shown in + # the string. The patch field translates to the single character suffix that + # indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so + # on. - string(REGEX REPLACE "^0" "" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}") - string(REGEX REPLACE "^0" "" OPENSSL_VERSION_PATCH "${OPENSSL_VERSION_PATCH}") + string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$" + "\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}") + list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR) + list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR) + list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX) + list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH) - set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}") + string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}") + string(REGEX REPLACE "^0(.)" "\\1" OPENSSL_VERSION_FIX "${OPENSSL_VERSION_FIX}") + + if (NOT OPENSSL_VERSION_PATCH STREQUAL "00") + # 96 is the ASCII code of 'a' minus 1 + math(EXPR OPENSSL_VERSION_PATCH_ASCII "${OPENSSL_VERSION_PATCH} + 96") + # Once anyone knows how OpenSSL would call the patch versions beyond 'z' + # this should be updated to handle that, too. This has not happened yet + # so it is simply ignored here for now. + string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING) + endif (NOT OPENSSL_VERSION_PATCH STREQUAL "00") + + set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}") + endif (_OPENSSL_VERSION) endif (OPENSSL_INCLUDE_DIR) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index c47f583..ce58899 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -85,14 +85,12 @@ ### Common stuff #### set(PKG_CONFIG_VERSION 1) -set(PKG_CONFIG_FOUND 0) find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") mark_as_advanced(PKG_CONFIG_EXECUTABLE) -if(PKG_CONFIG_EXECUTABLE) - set(PKG_CONFIG_FOUND 1) -endif(PKG_CONFIG_EXECUTABLE) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +find_package_handle_standard_args(PkgConfig DEFAULT_MSG PKG_CONFIG_EXECUTABLE) # Unsets the given variables diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 5344304..1e1e493 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -7,6 +7,9 @@ # (vsprojects/Debug & vsprojects/Release) will be searched # for libraries and binaries. # +# PROTOBUF_IMPORT_DIRS - List of additional directories to be searched for +# imported .proto files. (New in CMake 2.8.8) +# # Defines the following variables: # # PROTOBUF_FOUND - Found the Google Protocol Buffers library (libprotobuf & header files) @@ -91,6 +94,16 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) endif() + if(DEFINED PROTOBUF_IMPORT_DIRS) + foreach(DIR ${PROTOBUF_IMPORT_DIRS}) + get_filename_component(ABS_PATH ${DIR} ABSOLUTE) + list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) + if(${_contains_already} EQUAL -1) + list(APPEND _protobuf_include_path -I ${ABS_PATH}) + endif() + endforeach() + endif() + set(${SRCS}) set(${HDRS}) foreach(FIL ${ARGN}) diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index a10ec23..d5a2a5e 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -26,14 +26,51 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +unset(_Python_NAMES) + +set(_PYTHON1_VERSIONS 1.6 1.5) +set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) + +if(PythonInterp_FIND_VERSION) + if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") + string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION}") + string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}") + list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN} python${_PYTHON_FIND_MAJ}) + unset(_PYTHON_FIND_OTHER_VERSIONS) + if(NOT PythonInterp_FIND_VERSION_EXACT) + foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS}) + if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) + list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) + endif() + endforeach() + endif(NOT PythonInterp_FIND_VERSION_EXACT) + unset(_PYTHON_FIND_MAJ_MIN) + unset(_PYTHON_FIND_MAJ) + else(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") + list(APPEND _Python_NAMES python${PythonInterp_FIND_VERSION}) + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonInterp_FIND_VERSION}_VERSIONS}) + endif(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") +else(PythonInterp_FIND_VERSION) + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) +endif(PythonInterp_FIND_VERSION) + +list(APPEND _Python_NAMES python) + # Search for the current active python version first -find_program(PYTHON_EXECUTABLE NAMES python) +find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS} - 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) + ${_PYTHON_FIND_OTHER_VERSIONS} + ) + +unset(_PYTHON_FIND_OTHER_VERSIONS) +unset(_PYTHON1_VERSIONS) +unset(_PYTHON2_VERSIONS) +unset(_PYTHON3_VERSIONS) # Search for newest python version if python executable isn't found if(NOT PYTHON_EXECUTABLE) @@ -52,11 +89,15 @@ endif() # determine python version string if(PYTHON_EXECUTABLE) execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version ERROR_VARIABLE _VERSION OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE) - string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}") - string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}") -endif() + if(_VERSION MATCHES "^Python [0-9]+\\.[0-9]+.*") + string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}") + string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}") + string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}") + if(PYTHON_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+.*") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}") + endif() + endif() +endif(PYTHON_EXECUTABLE) # handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if # all listed variables are TRUE diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 14deb24..dca528d 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -350,33 +350,33 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) targetIt!=targetList.GetVector().end(); ++targetIt) { - // Lookup this target in the current directory. - if(cmTarget* target=this->Makefile->FindTarget(targetIt->c_str())) - { - // Found the target. Check its type. - if(target->GetType() != cmTarget::EXECUTABLE && - target->GetType() != cmTarget::STATIC_LIBRARY && - target->GetType() != cmTarget::SHARED_LIBRARY && - target->GetType() != cmTarget::MODULE_LIBRARY) - { - cmOStringStream e; - e << "TARGETS given target \"" << (*targetIt) - << "\" which is not an executable, library, or module."; - this->SetError(e.str().c_str()); - return false; - } - // Store the target in the list to be installed. - targets.push_back(target); - } - else + // Lookup this target in the current directory. + if(cmTarget* target=this->Makefile->FindTarget(targetIt->c_str())) + { + // Found the target. Check its type. + if(target->GetType() != cmTarget::EXECUTABLE && + target->GetType() != cmTarget::STATIC_LIBRARY && + target->GetType() != cmTarget::SHARED_LIBRARY && + target->GetType() != cmTarget::MODULE_LIBRARY) { - // Did not find the target. cmOStringStream e; e << "TARGETS given target \"" << (*targetIt) - << "\" which does not exist in this directory."; + << "\" which is not an executable, library, or module."; this->SetError(e.str().c_str()); return false; } + // Store the target in the list to be installed. + targets.push_back(target); + } + else + { + // Did not find the target. + cmOStringStream e; + e << "TARGETS given target \"" << (*targetIt) + << "\" which does not exist in this directory."; + this->SetError(e.str().c_str()); + return false; + } } // Keep track of whether we will be performing an installation of @@ -602,98 +602,98 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) break; } - // These well-known sets of files are installed *automatically* for FRAMEWORK - // SHARED library targets on the Mac as part of installing the FRAMEWORK. - // For other target types or on other platforms, they are not installed - // automatically and so we need to create install files generators for them. - // - bool createInstallGeneratorsForTargetFileSets = true; - - if(target.IsFrameworkOnApple()) - { - createInstallGeneratorsForTargetFileSets = false; - } + // These well-known sets of files are installed *automatically* for + // FRAMEWORK SHARED library targets on the Mac as part of installing the + // FRAMEWORK. For other target types or on other platforms, they are not + // installed automatically and so we need to create install files + // generators for them. + bool createInstallGeneratorsForTargetFileSets = true; - if(createInstallGeneratorsForTargetFileSets && !namelinkOnly) - { - const char* files = target.GetProperty("PRIVATE_HEADER"); - if ((files) && (*files)) + if(target.IsFrameworkOnApple()) { - std::vector<std::string> relFiles; - cmSystemTools::ExpandListArgument(files, relFiles); - std::vector<std::string> absFiles; - if (!this->MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles)) - { - return false; - } - - // Create the files install generator. - if (!privateHeaderArgs.GetDestination().empty()) - { - privateHeaderGenerator = CreateInstallFilesGenerator(absFiles, - privateHeaderArgs, false); - } - else - { - cmOStringStream e; - e << "INSTALL TARGETS - target " << target.GetName() << " has " - << "PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION."; - cmSystemTools::Message(e.str().c_str(), "Warning"); - } + createInstallGeneratorsForTargetFileSets = false; } - files = target.GetProperty("PUBLIC_HEADER"); - if ((files) && (*files)) + if(createInstallGeneratorsForTargetFileSets && !namelinkOnly) { - std::vector<std::string> relFiles; - cmSystemTools::ExpandListArgument(files, relFiles); - std::vector<std::string> absFiles; - if (!this->MakeFilesFullPath("PUBLIC_HEADER", relFiles, absFiles)) + const char* files = target.GetProperty("PRIVATE_HEADER"); + if ((files) && (*files)) { - return false; - } + std::vector<std::string> relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector<std::string> absFiles; + if (!this->MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles)) + { + return false; + } - // Create the files install generator. - if (!publicHeaderArgs.GetDestination().empty()) - { - publicHeaderGenerator = CreateInstallFilesGenerator(absFiles, - publicHeaderArgs, false); - } - else - { - cmOStringStream e; - e << "INSTALL TARGETS - target " << target.GetName() << " has " - << "PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION."; - cmSystemTools::Message(e.str().c_str(), "Warning"); + // Create the files install generator. + if (!privateHeaderArgs.GetDestination().empty()) + { + privateHeaderGenerator = + CreateInstallFilesGenerator(absFiles, privateHeaderArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } } - } - files = target.GetProperty("RESOURCE"); - if ((files) && (*files)) - { - std::vector<std::string> relFiles; - cmSystemTools::ExpandListArgument(files, relFiles); - std::vector<std::string> absFiles; - if (!this->MakeFilesFullPath("RESOURCE", relFiles, absFiles)) + files = target.GetProperty("PUBLIC_HEADER"); + if ((files) && (*files)) { - return false; - } + std::vector<std::string> relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector<std::string> absFiles; + if (!this->MakeFilesFullPath("PUBLIC_HEADER", relFiles, absFiles)) + { + return false; + } - // Create the files install generator. - if (!resourceArgs.GetDestination().empty()) - { - resourceGenerator = CreateInstallFilesGenerator(absFiles, - resourceArgs, false); + // Create the files install generator. + if (!publicHeaderArgs.GetDestination().empty()) + { + publicHeaderGenerator = + CreateInstallFilesGenerator(absFiles, publicHeaderArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } } - else + + files = target.GetProperty("RESOURCE"); + if ((files) && (*files)) { - cmOStringStream e; - e << "INSTALL TARGETS - target " << target.GetName() << " has " - << "RESOURCE files but no RESOURCE DESTINATION."; - cmSystemTools::Message(e.str().c_str(), "Warning"); + std::vector<std::string> relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector<std::string> absFiles; + if (!this->MakeFilesFullPath("RESOURCE", relFiles, absFiles)) + { + return false; + } + + // Create the files install generator. + if (!resourceArgs.GetDestination().empty()) + { + resourceGenerator = CreateInstallFilesGenerator(absFiles, + resourceArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "RESOURCE files but no RESOURCE DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } } } - } // Keep track of whether we're installing anything in each category installsArchive = installsArchive || archiveGenerator != 0; diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 8f62322..377b43a 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -168,9 +168,7 @@ public: "On non-DLL platforms mySharedLib will be installed to <prefix>/lib " "and /some/full/path. On DLL platforms the mySharedLib DLL will be " "installed to <prefix>/bin and /some/full/path and its import library " - "will be installed to <prefix>/lib/static and /some/full/path. " - "On non-DLL platforms mySharedLib will be installed to <prefix>/lib " - "and /some/full/path." + "will be installed to <prefix>/lib/static and /some/full/path." "\n" "The EXPORT option associates the installed target files with an " "export called <export-name>. " diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 50d3f08..764dc38 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2012) SET(KWSYS_DATE_STAMP_MONTH 01) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 17) +SET(KWSYS_DATE_STAMP_DAY 25) diff --git a/Tests/CMakeCommands/target_link_libraries/depC.cpp b/Tests/CMakeCommands/target_link_libraries/depC.cpp index 93410a8..60bed59 100644 --- a/Tests/CMakeCommands/target_link_libraries/depC.cpp +++ b/Tests/CMakeCommands/target_link_libraries/depC.cpp @@ -10,4 +10,4 @@ DepA DepC::getA() { DepA a; return a; -}
\ No newline at end of file +} diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt new file mode 100644 index 0000000..8a38f06 --- /dev/null +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required (VERSION 2.8) +project(AllFindModules) + +if (POLICY CMP0017) + cmake_policy(SET CMP0017 NEW) +endif () + +# Avoid ctest truncation of output +message(STATUS "CTEST_FULL_OUTPUT") + +file(GLOB FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/Find*.cmake" ) + +macro(do_find MODULE_NAME) + message(STATUS " Checking Find${MODULE_NAME}") + find_package(${MODULE_NAME}) +endmacro(do_find) + +foreach(FIND_MODULE ${FIND_MODULES}) + string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}") + + # It is only possible to use either Qt3 or Qt4 in one project. + # Since FindQt will complain if both are found we explicitely + # filter out this and FindQt3. FindKDE3 also depends on Qt3 and + # is therefore also blocked + + if (NOT MODULE_NAME STREQUAL "Qt" AND + NOT MODULE_NAME STREQUAL "Qt3" AND + NOT MODULE_NAME STREQUAL "KDE3") + do_find(${MODULE_NAME}) + endif () + +endforeach(FIND_MODULE) + +# Qt4 is not present, so we can check Qt3 +if(NOT QT4_FOUND) + foreach(FIND_MODULE "Qt3" "Qt" "KDE3") + do_find(${FIND_MODULE}) + endforeach(FIND_MODULE) +endif(NOT QT4_FOUND) diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index f6aa9b5..20e6a3a 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -14,3 +14,5 @@ set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT 90) add_CMakeOnly_test(CheckSymbolExists) add_CMakeOnly_test(CheckCXXSymbolExists) + +add_CMakeOnly_test(AllFindModules) diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp b/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp index 445a652..eec46d3 100644 --- a/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp +++ b/Tests/Module/GenerateExportHeader/nodeprecated/src/main.cpp @@ -6,4 +6,4 @@ int main(int, char**) SomeClass sc; sc.someMethod(); return 0; -}
\ No newline at end of file +} diff --git a/Tests/Module/GenerateExportHeader/override_symbol/main.cpp b/Tests/Module/GenerateExportHeader/override_symbol/main.cpp index 445a652..eec46d3 100644 --- a/Tests/Module/GenerateExportHeader/override_symbol/main.cpp +++ b/Tests/Module/GenerateExportHeader/override_symbol/main.cpp @@ -6,4 +6,4 @@ int main(int, char**) SomeClass sc; sc.someMethod(); return 0; -}
\ No newline at end of file +} diff --git a/Tests/Module/GenerateExportHeader/override_symbol/someclass.cpp b/Tests/Module/GenerateExportHeader/override_symbol/someclass.cpp index 7326b78..427ec29 100644 --- a/Tests/Module/GenerateExportHeader/override_symbol/someclass.cpp +++ b/Tests/Module/GenerateExportHeader/override_symbol/someclass.cpp @@ -4,4 +4,4 @@ void SomeClass::someMethod() const { -}
\ No newline at end of file +} diff --git a/Tests/Module/GenerateExportHeader/prefix/main.cpp b/Tests/Module/GenerateExportHeader/prefix/main.cpp index d04ae3c..507f6fd 100644 --- a/Tests/Module/GenerateExportHeader/prefix/main.cpp +++ b/Tests/Module/GenerateExportHeader/prefix/main.cpp @@ -5,4 +5,4 @@ int main(int argc, char **argv) { UsePrefixClass upc; return upc.someMethod(); -}
\ No newline at end of file +} diff --git a/Tests/Module/GenerateExportHeader/prefix/useprefixclass.cpp b/Tests/Module/GenerateExportHeader/prefix/useprefixclass.cpp index 8337ab8..1fd2cb2 100644 --- a/Tests/Module/GenerateExportHeader/prefix/useprefixclass.cpp +++ b/Tests/Module/GenerateExportHeader/prefix/useprefixclass.cpp @@ -4,4 +4,4 @@ int UsePrefixClass::someMethod() const { return 0; -}
\ No newline at end of file +} diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake index 115181d..522ee76 100644 --- a/Utilities/Release/dashmacmini2_release.cmake +++ b/Utilities/Release/dashmacmini2_release.cmake @@ -5,14 +5,14 @@ set(INSTALL_PREFIX /) set(HOST dashmacmini2) set(MAKE_PROGRAM "make") set(MAKE "${MAKE_PROGRAM} -j2") -set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ") +set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ") set(INITIAL_CACHE " CMAKE_BUILD_TYPE:STRING=Release CMAKE_OSX_ARCHITECTURES:STRING=ppc;i386 CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CPACK_SYSTEM_NAME:STRING=Darwin-universal BUILD_QtDialog:BOOL=TRUE -QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Software/QtBinUniversal/bin/qmake +QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Dashboards/Support/qt-4.6.3/bin/bin/qmake ") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${path}/release_cmake.cmake) |