[Cmake-commits] [cmake-commits] king committed CMakeParseImplicitLinkInfo.cmake 1.3.2.2 1.3.2.3 CPackRPM.cmake 1.13.2.1 1.13.2.2 FindCUDA.cmake 1.2.2.3 1.2.2.4 FindQt4.cmake 1.166.2.3 1.166.2.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Nov 11 13:34:17 EST 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv11010/Modules
Modified Files:
Tag: CMake-2-8
CMakeParseImplicitLinkInfo.cmake CPackRPM.cmake FindCUDA.cmake
FindQt4.cmake
Log Message:
CMake 2.8.0-rc7
Index: CMakeParseImplicitLinkInfo.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeParseImplicitLinkInfo.cmake,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C 2 -d -r1.3.2.2 -r1.3.2.3
*** CMakeParseImplicitLinkInfo.cmake 9 Oct 2009 20:11:10 -0000 1.3.2.2
--- CMakeParseImplicitLinkInfo.cmake 11 Nov 2009 18:34:12 -0000 1.3.2.3
***************
*** 18,22 ****
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
! set(implicit_libs "")
set(implicit_dirs_tmp)
set(log "")
--- 18,22 ----
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
! set(implicit_libs_tmp "")
set(implicit_dirs_tmp)
set(log "")
***************
*** 54,62 ****
# Unix library.
string(REGEX REPLACE "^-l" "" lib "${arg}")
! list(APPEND implicit_libs ${lib})
set(log "${log} arg [${arg}] ==> lib [${lib}]\n")
elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.a$")
# Unix library full path.
! list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-Y(P,)?")
--- 54,62 ----
# Unix library.
string(REGEX REPLACE "^-l" "" lib "${arg}")
! list(APPEND implicit_libs_tmp ${lib})
set(log "${log} arg [${arg}] ==> lib [${lib}]\n")
elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.a$")
# Unix library full path.
! list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-Y(P,)?")
***************
*** 68,76 ****
elseif("${arg}" MATCHES "^-l:")
# HP named library.
! list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-z(all|default|weak)extract")
# Link editor option.
! list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> opt [${arg}]\n")
else()
--- 68,76 ----
elseif("${arg}" MATCHES "^-l:")
# HP named library.
! list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-z(all|default|weak)extract")
# Link editor option.
! list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> opt [${arg}]\n")
else()
***************
*** 91,94 ****
--- 91,105 ----
endforeach()
+ # Cleanup list of libraries and flags.
+ # We remove items that are not language-specific.
+ set(implicit_libs "")
+ foreach(lib IN LISTS implicit_libs_tmp)
+ if("${lib}" MATCHES "^(crt.*\\.o|gcc.*|System.*)$")
+ set(log "${log} remove lib [${lib}]\n")
+ else()
+ list(APPEND implicit_libs "${lib}")
+ endif()
+ endforeach()
+
# Cleanup list of directories.
set(implicit_dirs "")
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.166.2.3
retrieving revision 1.166.2.4
diff -C 2 -d -r1.166.2.3 -r1.166.2.4
*** FindQt4.cmake 10 Nov 2009 14:03:36 -0000 1.166.2.3
--- FindQt4.cmake 11 Nov 2009 18:34:12 -0000 1.166.2.4
***************
*** 644,648 ****
# Set QT_QTASSISTANT_INCLUDE_DIR
! FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QAssistantClient
PATHS
${QT_HEADERS_DIR}/QtAssistant
--- 644,648 ----
# Set QT_QTASSISTANT_INCLUDE_DIR
! FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
PATHS
${QT_HEADERS_DIR}/QtAssistant
Index: FindCUDA.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindCUDA.cmake,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -C 2 -d -r1.2.2.3 -r1.2.2.4
*** FindCUDA.cmake 28 Oct 2009 16:14:56 -0000 1.2.2.3
--- FindCUDA.cmake 11 Nov 2009 18:34:12 -0000 1.2.2.4
***************
*** 162,169 ****
# and will link in the resulting object file automatically.
#
- # This script also looks at optional arguments STATIC, SHARED, or MODULE to
- # override the behavior specified by the value of the CMake variable
- # BUILD_SHARED_LIBS. See BUILD_SHARED_LIBS below for more details.
- #
# This script will also generate a separate cmake script that is used at
# build time to invoke nvcc. This is for serveral reasons.
--- 162,165 ----
***************
*** 182,192 ****
# regenerated when the options change.
#
! # In addition, on some systems special flags are added for building objects
! # intended for shared libraries. FindCUDA make use of the CMake variable
! # BUILD_SHARED_LIBS and the usual STATIC, SHARED, and MODULE arguments to
! # determine if these flags should be used. Please set BUILD_SHARED_LIBS or
! # pass in STATIC, SHARED, or MODULE according to how the objects are to be
! # used before calling CUDA_ADD_LIBRARY. A preprocessor macro,
! # <target_name>_EXPORTS is defined when BUILD_SHARED_LIBS is defined.
#
# Flags passed into add_definitions with -D or /D are passed along to nvcc.
--- 178,188 ----
# regenerated when the options change.
#
! # This script also looks at optional arguments STATIC, SHARED, or MODULE to
! # determine when to target the object compilation for a shared library.
! # BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
! # CUDA_ADD_LIBRARY. On some systems special flags are added for building
! # objects intended for shared libraries. A preprocessor macro,
! # <target_name>_EXPORTS is defined when a shared library compilation is
! # detected.
#
# Flags passed into add_definitions with -D or /D are passed along to nvcc.
***************
*** 756,759 ****
--- 752,776 ----
endfunction()
+ function(CUDA_BUILD_SHARED_LIBRARY shared_flag)
+ set(cmake_args ${ARGN})
+ # If SHARED, MODULE, or STATIC aren't already in the list of arguments, then
+ # add SHARED or STATIC based on the value of BUILD_SHARED_LIBS.
+ list(FIND cmake_args SHARED _cuda_found_SHARED)
+ list(FIND cmake_args MODULE _cuda_found_MODULE)
+ list(FIND cmake_args STATIC _cuda_found_STATIC)
+ if( _cuda_found_SHARED GREATER -1 OR
+ _cuda_found_MODULE GREATER -1 OR
+ _cuda_found_STATIC GREATER -1)
+ set(_cuda_build_shared_libs)
+ else()
+ if (BUILD_SHARED_LIBS)
+ set(_cuda_build_shared_libs SHARED)
+ else()
+ set(_cuda_build_shared_libs STATIC)
+ endif()
+ endif()
+ set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE)
+ endfunction()
+
##############################################################################
# This helper macro populates the following variables and setups up custom
***************
*** 848,853 ****
CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})
! # Figure out if we are building a shared library. Default the value of BUILD_SHARED_LIBS.
! set(_cuda_build_shared_libs ${BUILD_SHARED_LIBS})
# SHARED, MODULE
list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
--- 865,871 ----
CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})
! # Figure out if we are building a shared library. BUILD_SHARED_LIBS is
! # respected in CUDA_ADD_LIBRARY.
! set(_cuda_build_shared_libs FALSE)
# SHARED, MODULE
list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
***************
*** 867,870 ****
--- 885,890 ----
# compiling objects for shared libraries.
set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS})
+ else()
+ set(CUDA_HOST_SHARED_FLAGS)
endif()
# Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We
***************
*** 1084,1089 ****
# Separate the sources from the options
CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
# Create custom commands and targets for each file.
! CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} ${_cmake_options}
OPTIONS ${_options} )
--- 1104,1111 ----
# Separate the sources from the options
CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
+ CUDA_BUILD_SHARED_LIBRARY(_cuda_shared_flag ${ARGN})
# Create custom commands and targets for each file.
! CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources}
! ${_cmake_options} ${_cuda_shared_flag}
OPTIONS ${_options} )
Index: CPackRPM.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CPackRPM.cmake,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -C 2 -d -r1.13.2.1 -r1.13.2.2
*** CPackRPM.cmake 1 Oct 2009 21:20:22 -0000 1.13.2.1
--- CPackRPM.cmake 11 Nov 2009 18:34:12 -0000 1.13.2.2
***************
*** 278,283 ****
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
-
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
IF(CPACK_RPM_USER_BINARY_SPECFILE)
--- 278,288 ----
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
+ # Use files tree to construct files command (spec file)
+ EXECUTE_PROCESS(COMMAND find -type f
+ COMMAND sed {s/\\.//}
+ WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
+ OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
+
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
IF(CPACK_RPM_USER_BINARY_SPECFILE)
***************
*** 327,330 ****
--- 332,337 ----
# we skip the _prepn _build and _install
# steps because CPack does that for us
+ # WE MUST NOT DO ANYTHING in those steps because they
+ # may fail for non-privileged user
#p prep
***************
*** 339,345 ****
#p dir %{prefix}
#p {prefix}/*
! /*
%changelog
* Mon Oct 03 2008 Erk <eric.noulard at gmail.com>
Update generator to handle optional dependencies using Requires
--- 346,354 ----
#p dir %{prefix}
#p {prefix}/*
! ${CPACK_RPM_INSTALL_FILES}
%changelog
+ * Sat Oct 03 2009 Kami <cmoidavid at gmail.com>
+ Update to handle more precisely the files section
* Mon Oct 03 2008 Erk <eric.noulard at gmail.com>
Update generator to handle optional dependencies using Requires
More information about the Cmake-commits
mailing list