diff options
27 files changed, 194 insertions, 74 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake index fcd0099..859fe11 100644 --- a/Modules/CMakeRCInformation.cmake +++ b/Modules/CMakeRCInformation.cmake @@ -20,6 +20,9 @@ # make sure we don't use CMAKE_BASE_NAME from somewhere else SET(CMAKE_BASE_NAME) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) +IF("${CMAKE_BASE_NAME}" MATCHES "windres") + SET(CMAKE_BASE_NAME "windres") +ENDIF() SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 4d4e35f..779b2f0 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -35,7 +35,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS) "{ (void)argv; return argc-1;}\n") TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c - OUTPUT_VARIABLE OUTPUT) + OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT) SET(C_TEST_WAS_RUN 1) ENDIF(NOT CMAKE_C_COMPILER_WORKS) @@ -43,7 +43,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS) PrintTestCompilerStatus("C" " -- broken") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C compiler works failed with " - "the following output:\n${OUTPUT}\n\n") + "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") # if the compiler is broken make sure to remove the platform file # since Windows-cl configures both c/cxx files both need to be removed # when c or c++ fails @@ -51,14 +51,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS) FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake ) MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" " "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${OUTPUT}\n\n" + "with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n" "CMake will not be able to correctly generate this project.") ELSE(NOT CMAKE_C_COMPILER_WORKS) IF(C_TEST_WAS_RUN) PrintTestCompilerStatus("C" " -- works") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C compiler works passed with " - "the following output:\n${OUTPUT}\n\n") + "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") ENDIF(C_TEST_WAS_RUN) SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") @@ -84,3 +84,4 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS) ENDIF() ENDIF(NOT CMAKE_C_COMPILER_WORKS) +UNSET(__CMAKE_C_COMPILER_OUTPUT) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 494add3..87022e9 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -28,7 +28,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS) "int main(){return 0;}\n") TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx - OUTPUT_VARIABLE OUTPUT) + OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT) SET(CXX_TEST_WAS_RUN 1) ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) @@ -41,17 +41,17 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS) FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake ) FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler works failed with " - "the following output:\n${OUTPUT}\n\n") + "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" " "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${OUTPUT}\n\n" + "with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n" "CMake will not be able to correctly generate this project.") ELSE(NOT CMAKE_CXX_COMPILER_WORKS) IF(CXX_TEST_WAS_RUN) PrintTestCompilerStatus("CXX" " -- works") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the CXX compiler works passed with " - "the following output:\n${OUTPUT}\n\n") + "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") ENDIF(CXX_TEST_WAS_RUN) SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "") @@ -76,3 +76,5 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS) UNSET(CMAKE_CXX_ABI_FILES) ENDIF() ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) + +UNSET(__CMAKE_CXX_COMPILER_OUTPUT) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index bb1021b..bf476ad 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -161,6 +161,15 @@ # CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE # One may verify which scriptlet has been included with # rpm -qp --scripts package.rpm +# CPACK_RPM_USER_FILELIST +# CPACK_RPM_<COMPONENT>_USER_FILELIST +# Mandatory : NO +# Default : - +# May be used to explicitely specify %(<directive>) file line +# in the spec file. Like %config(noreplace) or any other directive +# that be found in the %files section. Since CPackRPM is generating +# the list of files (and directories) the user specified files of +# the CPACK_RPM_<COMPONENT>_USER_FILELIST list will be removed from the generated list. # CPACK_RPM_CHANGELOG_FILE # Mandatory : NO # Default : - @@ -594,23 +603,89 @@ EXECUTE_PROCESS(COMMAND find . -type f -o -type l -o (-type d -a -not -name ".") WORKING_DIRECTORY "${WDIR}" OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES) -# In component case, replace CPACK_ABSOLUTE_DESTINATION_FILES -# with the content of CPACK_ABSOLUTE_DESTINATION_FILES_<COMPONENT> -# This must be done BEFORE the CPACK_ABSOLUTE_DESTINATION_FILES handling +# In component case, put CPACK_ABSOLUTE_DESTINATION_FILES_<COMPONENT> +# into CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL +# otherwise, put CPACK_ABSOLUTE_DESTINATION_FILES +# This must be done BEFORE the CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL handling if(CPACK_RPM_PACKAGE_COMPONENT) if(CPACK_ABSOLUTE_DESTINATION_FILES) set(COMPONENT_FILES_TAG "CPACK_ABSOLUTE_DESTINATION_FILES_${CPACK_RPM_PACKAGE_COMPONENT}") - set(CPACK_ABSOLUTE_DESTINATION_FILES "${${COMPONENT_FILES_TAG}}") + set(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL "${${COMPONENT_FILES_TAG}}") if(CPACK_RPM_PACKAGE_DEBUG) - message("CPackRPM:Debug: Handling Absolute Destination Files ${CPACK_ABSOLUTE_DESTINATION_FILES}") + message("CPackRPM:Debug: Handling Absolute Destination Files: <${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}>") message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}") endif(CPACK_RPM_PACKAGE_DEBUG) endif() +else() + if(CPACK_ABSOLUTE_DESTINATION_FILES) + set(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL "${CPACK_ABSOLUTE_DESTINATION_FILES}") + endif() +endif() + +# In component case, set CPACK_RPM_USER_FILELIST_INTERNAL with CPACK_RPM_<COMPONENT>_USER_FILELIST. +if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_FILELIST) + set(CPACK_RPM_USER_FILELIST_INTERNAL ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_FILELIST}) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>") + message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}") + endif(CPACK_RPM_PACKAGE_DEBUG) + else() + set(CPACK_RPM_USER_FILELIST_INTERNAL "") + endif() +else() + if(CPACK_RPM_USER_FILELIST) + set(CPACK_RPM_USER_FILELIST_INTERNAL "${CPACK_RPM_USER_FILELIST}") + else() + set(CPACK_RPM_USER_FILELIST_INTERNAL "") + endif() +endif() + +# Handle user specified file line list in CPACK_RPM_USER_FILELIST_INTERNAL +# Remove those files from CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL +# or CPACK_RPM_INSTALL_FILES, +# hence it must be done before these auto-generated lists are processed. +if(CPACK_RPM_USER_FILELIST_INTERNAL) + IF(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + + # Create CMake list from CPACK_RPM_INSTALL_FILES + string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST) + string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST + "${CPACK_RPM_INSTALL_FILES_LIST}") + string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST + "${CPACK_RPM_INSTALL_FILES_LIST}") + + set(CPACK_RPM_USER_INSTALL_FILES "") + foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL) + string(REGEX REPLACE "%[A-Za-z\(\)]* " "" F_PATH ${F}) + string(REGEX MATCH "%[A-Za-z\(\)]*" F_PREFIX ${F}) + + if(F_PREFIX) + set(F_PREFIX "${F_PREFIX} ") + endif() + # Rebuild the user list file + set(CPACK_RPM_USER_INSTALL_FILES "${CPACK_RPM_USER_INSTALL_FILES}${F_PREFIX}\"${F_PATH}\"\n") + + # Remove from CPACK_RPM_INSTALL_FILES and CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL + list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${F_PATH}) + list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH}) + + endforeach() + + # Rebuild CPACK_RPM_INSTALL_FILES + set(CPACK_RPM_INSTALL_FILES "") + foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST) + set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n") + endforeach(F) +else() + set(CPACK_RPM_USER_INSTALL_FILES "") endif() -if (CPACK_ABSOLUTE_DESTINATION_FILES) +if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL) IF(CPACK_RPM_PACKAGE_DEBUG) - message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES}") + message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}") ENDIF(CPACK_RPM_PACKAGE_DEBUG) # Remove trailing space string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST) @@ -619,7 +694,7 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES) # Remove unecessary quotes string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}") # Remove ABSOLUTE install file from INSTALL FILE LIST - list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES}) + list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}) # Rebuild INSTALL_FILES set(CPACK_RPM_INSTALL_FILES "") foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST) @@ -627,14 +702,17 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES) endforeach(F) # Build ABSOLUTE_INSTALL_FILES set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "") - foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES) + foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL) set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n") endforeach(F) IF(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}") message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}") ENDIF(CPACK_RPM_PACKAGE_DEBUG) -endif(CPACK_ABSOLUTE_DESTINATION_FILES) +else() + # reset vars in order to avoid leakage of value(s) from one component to another + set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "") +endif(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL) # The name of the final spec file to be used by rpmbuild SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec") @@ -724,6 +802,7 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT %defattr(-,root,root,-) ${CPACK_RPM_INSTALL_FILES} ${CPACK_RPM_ABSOLUTE_INSTALL_FILES} +${CPACK_RPM_USER_INSTALL_FILES} %changelog \@CPACK_RPM_SPEC_CHANGELOG\@ diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 5350301..80a13d4 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -204,6 +204,8 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va else() if(configurations AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)) set(configurations CONFIGURATIONS ${configurations}) + else() + unset(configurations) endif() if(component) set(component COMPONENT ${component}) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index f88eed0..884266f 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -80,17 +80,17 @@ foreach(_library ${_list}) if(_libraries_work) if (BLA_STATIC) if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRRAY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) endif ( WIN32 ) if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRRAY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) else (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRRAY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) endif (APPLE) else (BLA_STATIC) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRRAY_SUFFIXES} .so.3gf) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) endif () endif (BLA_STATIC) find_library(${_prefix}_${_library}_LIBRARY @@ -123,7 +123,7 @@ if(_libraries_work) endif(_libraries_work) if(_libraries_work) - set(${LIBRARIES} ${${LIBRARIES}} ${_blas}) + set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads}) else(_libraries_work) set(${LIBRARIES} FALSE) endif(_libraries_work) diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake index 90ef59b..2455c5f 100644 --- a/Modules/FortranCInterface.cmake +++ b/Modules/FortranCInterface.cmake @@ -116,6 +116,14 @@ endforeach() #----------------------------------------------------------------------------- set(FortranCInterface_SOURCE_DIR ${CMAKE_ROOT}/Modules/FortranCInterface) +# MinGW's make tool does not always like () in the path +if("${CMAKE_GENERATOR}" MATCHES "MinGW" AND + "${FortranCInterface_SOURCE_DIR}" MATCHES "[()]") + file(COPY ${FortranCInterface_SOURCE_DIR}/ + DESTINATION ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW) + set(FortranCInterface_SOURCE_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW) +endif() + # Create the interface detection project if it does not exist. if(NOT FortranCInterface_BINARY_DIR) set(FortranCInterface_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterface) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index c11c8fb..867c788 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -187,11 +187,13 @@ IF(XCODE) SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) ENDIF(XCODE) -# Need to list dependent shared libraries on link line. When building -# with -isysroot (for universal binaries), the linker always looks for -# dependent libraries under the sysroot. Listing them on the link -# line works around the problem. -SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) +IF("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5") + # Need to list dependent shared libraries on link line. When building + # with -isysroot (for universal binaries), the linker always looks for + # dependent libraries under the sysroot. Listing them on the link + # line works around the problem. + SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) +ENDIF() SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) diff --git a/Modules/Platform/HP-UX-HP-ASM.cmake b/Modules/Platform/HP-UX-HP-ASM.cmake index 0a85905..05c69e4 100644 --- a/Modules/Platform/HP-UX-HP-ASM.cmake +++ b/Modules/Platform/HP-UX-HP-ASM.cmake @@ -1,6 +1,2 @@ include(Platform/HP-UX-HP) __hpux_compiler_hp(ASM) - -set(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-E -b +nodefaultrpath -L/usr/lib") - -set(CMAKE_ASM_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") diff --git a/Modules/Platform/HP-UX-HP-C.cmake b/Modules/Platform/HP-UX-HP-C.cmake index d83e01b..1000935 100644 --- a/Modules/Platform/HP-UX-HP-C.cmake +++ b/Modules/Platform/HP-UX-HP-C.cmake @@ -1,11 +1,6 @@ include(Platform/HP-UX-HP) __hpux_compiler_hp(C) -set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib") - set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -Aa -Ae <FLAGS> -o <OBJECT> -c <SOURCE>") - -# use ld directly to create shared libraries for hp cc -set(CMAKE_C_CREATE_SHARED_LIBRARY "ld <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") diff --git a/Modules/Platform/HP-UX-HP-CXX.cmake b/Modules/Platform/HP-UX-HP-CXX.cmake index 8f3c70c..dfa1e4e 100644 --- a/Modules/Platform/HP-UX-HP-CXX.cmake +++ b/Modules/Platform/HP-UX-HP-CXX.cmake @@ -1,8 +1,6 @@ include(Platform/HP-UX-HP) __hpux_compiler_hp(CXX) -set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib") - set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>" diff --git a/Modules/Platform/HP-UX-HP-Fortran.cmake b/Modules/Platform/HP-UX-HP-Fortran.cmake index 5a3ab19..30acab8 100644 --- a/Modules/Platform/HP-UX-HP-Fortran.cmake +++ b/Modules/Platform/HP-UX-HP-Fortran.cmake @@ -1,7 +1,2 @@ include(Platform/HP-UX-HP) __hpux_compiler_hp(Fortran) - -set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib") - -set(CMAKE_Fortran_CREATE_SHARED_LIBRARY - "ld <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 5e70d31..bce0a8b 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -17,18 +17,14 @@ if(__HPUX_COMPILER_HP) return() endif() set(__HPUX_COMPILER_HP 1) -set(_Wl_C "") -set(_Wl_CXX "-Wl,") -set(_Wl_Fortran "") -set(_Wl_ASM "") macro(__hpux_compiler_hp lang) set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-Wl,-E,+nodefaultrpath -b -L/usr/lib") set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") - set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "${_Wl_${lang}}+b") + set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") - set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "${_Wl_${lang}}+h") - set(CMAKE_EXECUTABLE_RUNTIME_${lang}_FLAG "-Wl,+b") + set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_FLAGS_INIT "") endmacro() diff --git a/Source/QtDialog/README b/Source/QtDialog/README deleted file mode 100644 index 0701a2b..0000000 --- a/Source/QtDialog/README +++ /dev/null @@ -1,3 +0,0 @@ -This is the Qt interface to CMake. It has a BSD license compatible with the -Qt license exception. Only developers with a paid QT license are permitted -to make changes to this code. Small patches and bug fixes can diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 14055a4..3f7fdc7 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -440,8 +440,12 @@ std::string cmCTest::GetCDashVersion() std::string cdashUri = this->GetCTestConfiguration("DropLocation"); cdashUri = cdashUri.substr(0, cdashUri.find("/submit.php")); - url += cdashUri + "/api/getversion.php"; - int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); + int res = 1; + if ( ! cdashUri.empty() ) + { + url += cdashUri + "/api/getversion.php"; + res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); + } return res ? this->GetCTestConfiguration("CDashVersion") : response; #else diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 1021bf2..802cfcf 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -429,7 +429,8 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) if(cmTarget::LinkInterface const* iface = entry.Target->GetLinkInterface(this->Config)) { - // We use just the shared dependencies, not the interface. + // Follow public and private dependencies transitively. + this->QueueSharedDependencies(index, iface->Libraries); this->QueueSharedDependencies(index, iface->SharedDeps); } } diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index f8ab686..edf6c35 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -161,7 +161,9 @@ listed on the command line. - On Windows, DLLs are not directly linked, and the import libraries have no transitive dependencies. - - On Mac, we need to actually list the transitive dependencies. + - On Mac OS X 10.5 and above transitive dependencies are not needed. + + - On Mac OS X 10.4 and below we need to actually list the dependencies. Otherwise when using -isysroot for universal binaries it cannot find the dependent libraries. Listing them on the command line tells the linker where to find them, but unfortunately also links diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 32eaef8..859503f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -458,8 +458,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile( std::vector<std::string>::iterator new_end = std::unique(lfiles.begin(), lfiles.end()); lfiles.erase(new_end, lfiles.end()); - std::string dir = mf->GetHomeOutputDirectory(); - this->CurrentReRunCMakeMakefile = dir; + this->CurrentReRunCMakeMakefile = mf->GetStartOutputDirectory(); this->CurrentReRunCMakeMakefile += "/CMakeScripts"; cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str()); this->CurrentReRunCMakeMakefile += "/ReRunCMake.make"; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8185b95..11a0387 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -223,6 +223,14 @@ void cmLocalVisualStudio7Generator this->FortranProject = static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator) ->TargetIsFortranOnly(target); + + // Intel Fortran for VS10 uses VS9 format ".vfproj" files. + VSVersion realVersion = this->Version; + if(this->FortranProject && this->Version >= VS10) + { + this->Version = VS9; + } + // add to the list of projects std::string pname = lname; target.SetProperty("GENERATOR_FILE_NAME",lname); @@ -250,6 +258,8 @@ void cmLocalVisualStudio7Generator { this->GlobalGenerator->FileReplacedDuringGenerate(fname); } + + this->Version = realVersion; } //---------------------------------------------------------------------------- diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index f52f7ab..a82c503 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -34,6 +34,20 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles() *this->BuildFileStream << "# Utility rule file for " << this->Target->GetName() << ".\n\n"; + if(!this->NoRuleMessages) + { + const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")? + "$(CMAKE_BINARY_DIR)/" : ""); + // Include the progress variables for the target. + *this->BuildFileStream + << "# Include the progress variables for this target.\n" + << this->LocalGenerator->IncludeDirective << " " << root + << this->Convert(this->ProgressFileNameFull.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE) + << "\n\n"; + } + // write the custom commands for this target this->WriteTargetBuildRules(); diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index ed7f62c..4d83293 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -326,7 +326,7 @@ void SystemTools::GetPath(kwsys_stl::vector<kwsys_stl::string>& path, const char kwsys_stl::string pathEnv = cpathEnv; // A hack to make the below algorithm work. - if(pathEnv[pathEnv.length()-1] != ':') + if(!pathEnv.empty() && pathEnv[pathEnv.length()-1] != pathSep[0]) { pathEnv += pathSep; } diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index f02efef..b03f656 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 12) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 14) +SET(KWSYS_DATE_STAMP_DAY 16) diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 235a1d2..f06a465 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -23,8 +23,13 @@ add_library(testLib1 STATIC testLib1.c) add_library(testLib2 STATIC testLib2.c) target_link_libraries(testLib2 testLib1) +# Test library with empty link interface. Link it to an implementation +# dependency that itself links to dependencies publicly. +add_library(testLib3ImpDep SHARED testLib3ImpDep.c) +set_property(TARGET testLib3ImpDep PROPERTY LIBRARY_OUTPUT_DIRECTORY impl/dep) add_library(testLib3Imp SHARED testLib3Imp.c) set_property(TARGET testLib3Imp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl) +target_link_libraries(testLib3Imp testLib3ImpDep) add_library(testLib3 SHARED testLib3.c) target_link_libraries(testLib3 testLib3Imp) set_property(TARGET testLib3 PROPERTY LINK_INTERFACE_LIBRARIES "") @@ -105,6 +110,14 @@ install( ARCHIVE DESTINATION lib/impl ) install( + TARGETS + testLib3ImpDep + EXPORT exp + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib/impl/dep + ARCHIVE DESTINATION lib/impl/dep + ) +install( TARGETS testLib5 EXPORT exp # Leave out RUNTIME DESTINATION to test implib-only export. @@ -120,7 +133,7 @@ endif(WIN32) # Export from build tree. export(TARGETS testExe1 testLib1 testLib2 testLib3 - testExe2libImp testLib3Imp + testExe2libImp testLib3Imp testLib3ImpDep NAMESPACE bld_ FILE ExportBuildTree.cmake ) diff --git a/Tests/ExportImport/Export/testLib3Imp.c b/Tests/ExportImport/Export/testLib3Imp.c index fb4c13f..c27bccd 100644 --- a/Tests/ExportImport/Export/testLib3Imp.c +++ b/Tests/ExportImport/Export/testLib3Imp.c @@ -1,7 +1,10 @@ #if defined(_WIN32) || defined(__CYGWIN__) # define testLib3Imp_EXPORT __declspec(dllexport) +# define testLib3ImpDep_IMPORT __declspec(dllimport) #else # define testLib3Imp_EXPORT +# define testLib3ImpDep_IMPORT #endif -testLib3Imp_EXPORT int testLib3Imp(void) { return 0; } +testLib3ImpDep_IMPORT int testLib3ImpDep(void); +testLib3Imp_EXPORT int testLib3Imp(void) { return testLib3ImpDep(); } diff --git a/Tests/ExportImport/Export/testLib3ImpDep.c b/Tests/ExportImport/Export/testLib3ImpDep.c new file mode 100644 index 0000000..578ac30 --- /dev/null +++ b/Tests/ExportImport/Export/testLib3ImpDep.c @@ -0,0 +1,7 @@ +#if defined(_WIN32) || defined(__CYGWIN__) +# define testLib3ImpDep_EXPORT __declspec(dllexport) +#else +# define testLib3ImpDep_EXPORT +#endif + +testLib3ImpDep_EXPORT int testLib3ImpDep(void) { return 0; } diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index ba0bdcc..a995f68 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -113,16 +113,8 @@ endfunction() # if the id's match or the compilers are compatible, then # call the test_fortran_c_interface_module function -if(("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel") - AND - ("${CMAKE_C_COMPILER_ID}" MATCHES "MSVC") - ) - set(COMPATABLE_COMPILERS TRUE) -endif() -if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES "Absoft:GNU") - set(COMPATABLE_COMPILERS TRUE) -endif() -if(COMPATABLE_COMPILERS +if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES + "(Intel:MSVC|Absoft:GNU)" OR ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" )) test_fortran_c_interface_module() else() diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake index da66002..74d5012 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -8,6 +8,7 @@ set(CPACK_SOURCE_GENERATORS "CygwinSource") set(MAKE_PROGRAM "make") set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE +DART_TESTING_TIMEOUT:STRING=7200 ") set(CXX g++) set(CC gcc) |