[Cmake-commits] [cmake-commits] lowman committed FindBoost.cmake 1.29 1.30
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jan 19 21:30:06 EST 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv30273
Modified Files:
FindBoost.cmake
Log Message:
BUG: Missing "icpc" as a possible CXX compiler for Intel C++. Also refactored
gcc -dumpversion code and regex to a function.
Index: FindBoost.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindBoost.cmake,v
retrieving revision 1.29
retrieving revision 1.30
diff -C 2 -d -r1.29 -r1.30
*** FindBoost.cmake 20 Jan 2009 00:21:10 -0000 1.29
--- FindBoost.cmake 20 Jan 2009 02:30:04 -0000 1.30
***************
*** 266,269 ****
--- 266,286 ----
ENDMACRO (_Boost_ADJUST_LIB_VARS)
+ #
+ # Runs compiler with "-dumpversion" and parses major/minor
+ # version with a regex.
+ #
+ FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
+
+ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
+ ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
+ OUTPUT_VARIABLE _boost_COMPILER_VERSION
+ )
+ STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
+ _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
+
+ SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
+ ENDFUNCTION()
+
+
#-------------------------------------------------------------------------------
***************
*** 514,518 ****
elseif (BORLAND)
SET (_boost_COMPILER "-bcb")
! elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl")
if(WIN32)
set (_boost_COMPILER "-iw")
--- 531,536 ----
elseif (BORLAND)
SET (_boost_COMPILER "-bcb")
! elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl"
! OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
if(WIN32)
set (_boost_COMPILER "-iw")
***************
*** 524,533 ****
SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
else()
! EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
! ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
! OUTPUT_VARIABLE _boost_COMPILER_VERSION
! )
! STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
! _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
endif()
--- 542,546 ----
SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
else()
! _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
endif()
***************
*** 537,547 ****
SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
else()
# Determine which version of GCC we have.
- EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE _boost_COMPILER_VERSION
- )
- STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
- _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
IF(APPLE)
IF(Boost_MINOR_VERSION)
--- 550,555 ----
SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
else()
+ _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
# Determine which version of GCC we have.
IF(APPLE)
IF(Boost_MINOR_VERSION)
More information about the Cmake-commits
mailing list