[Cmake-commits] [cmake-commits] king committed FindHDF5.cmake 1.10 1.11
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Dec 18 10:13:09 EST 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv20678/Modules
Modified Files:
FindHDF5.cmake
Log Message:
FindHDF5: Fix Windows compile-line parsing
We modify the signature of _HDF5_parse_compile_line to pass the command
line variable name rather than the command line itself. Otherwise the
CMake language MACRO implementation tries to parse the command line as
CMake syntax, which does not like backslashes.
Index: FindHDF5.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindHDF5.cmake,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** FindHDF5.cmake 15 Dec 2009 18:26:44 -0000 1.10
--- FindHDF5.cmake 18 Dec 2009 15:13:01 -0000 1.11
***************
*** 108,112 ****
# Parse a compile line for definitions, includes, library paths, and libraries.
macro( _HDF5_parse_compile_line
! compile_line
include_paths
definitions
--- 108,112 ----
# Parse a compile line for definitions, includes, library paths, and libraries.
macro( _HDF5_parse_compile_line
! compile_line_var
include_paths
definitions
***************
*** 116,120 ****
# Match the include paths
string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags
! "${compile_line}"
)
foreach( IPATH ${include_path_flags} )
--- 116,120 ----
# Match the include paths
string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags
! "${${compile_line_var}}"
)
foreach( IPATH ${include_path_flags} )
***************
*** 125,129 ****
# Match the definitions
! string( REGEX MATCHALL "-D[^ ]*" definition_flags "${compile_line}" )
foreach( DEF ${definition_flags} )
list( APPEND ${definitions} ${DEF} )
--- 125,129 ----
# Match the definitions
! string( REGEX MATCHALL "-D[^ ]*" definition_flags "${${compile_line_var}}" )
foreach( DEF ${definition_flags} )
list( APPEND ${definitions} ${DEF} )
***************
*** 132,136 ****
# Match the library paths
string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
! "${compile_line}"
)
--- 132,136 ----
# Match the library paths
string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
! "${${compile_line_var}}"
)
***************
*** 145,149 ****
# this is to exclude directory names like xxx-linux/
string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
! "${compile_line}" )
# strip the -l from all of the library flags and add to the search list
foreach( LIB ${library_name_flags} )
--- 145,149 ----
# this is to exclude directory names like xxx-linux/
string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
! "${${compile_line_var}}" )
# strip the -l from all of the library flags and add to the search list
foreach( LIB ${library_name_flags} )
***************
*** 181,185 ****
foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
if( HDF5_${LANGUAGE}_COMPILE_LINE )
! _HDF5_parse_compile_line( ${HDF5_${LANGUAGE}_COMPILE_LINE}
HDF5_${LANGUAGE}_INCLUDE_FLAGS
HDF5_${LANGUAGE}_DEFINITIONS
--- 181,185 ----
foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
if( HDF5_${LANGUAGE}_COMPILE_LINE )
! _HDF5_parse_compile_line( HDF5_${LANGUAGE}_COMPILE_LINE
HDF5_${LANGUAGE}_INCLUDE_FLAGS
HDF5_${LANGUAGE}_DEFINITIONS
More information about the Cmake-commits
mailing list