aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-11-07 21:40:31 +0000
committerJörg Mayer <jmayer@loplof.de>2013-11-07 21:40:31 +0000
commitfa3332e8ede5395a28d969947e95a8c5eddc6e53 (patch)
treebd56af6ab9c1a0c7223e2e3bf9f769116f24689b /cmake/modules
parent696194999e11862f48bcceb31ae750de0b528d48 (diff)
Remove extraction of cmake parameters from autotools files.
While it was an interesting exercise it just doesn't work good enough to stay, i.e. it doesn't automatically pick up changes but requires rerunning cmake instead. svn path=/trunk/; revision=53149
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/UseMakefileCommon.cmake53
1 files changed, 0 insertions, 53 deletions
diff --git a/cmake/modules/UseMakefileCommon.cmake b/cmake/modules/UseMakefileCommon.cmake
deleted file mode 100644
index 62bc8f5cc7..0000000000
--- a/cmake/modules/UseMakefileCommon.cmake
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# $Id$
-#
-
-# Pick one or more variables from the Makefile.common file
-# with a path relative to the current CMakeLists.txt and provide
-# their values as cmake variables of identical names.
-
-# Usage:
-# include(UseMakefileCommon)
-# VAR_FROM_MAKEFILE_COMMON( <PATH> <VAR-1> ... <VAR-N> )
-
-function( VARS_FROM_MAKEFILE_COMMON _path_to_mc )
- file( READ
- ${CMAKE_CURRENT_SOURCE_DIR}/${_path_to_mc}/Makefile.common
- _use_mc_content
- )
-
- # Fold long lines
- string( REGEX REPLACE
- "(\\\\\r?[\n^][ \t]*)"
- " "
- _use_mc_content
- "${_use_mc_content}"
- )
-
- foreach( _use_mc_varname ${ARGN} )
- string( REGEX MATCH
- ".*${_use_mc_varname}[ \t]*=[ \t]*([^\n]*)\r?[\n].*"
- _use_mc_var
- "${_use_mc_content}"
- )
- set( _use_mc_var ${CMAKE_MATCH_1} )
- string( REGEX REPLACE
- "[ \t]+"
- ";"
- _use_mc_var
- "${_use_mc_var}"
- )
- set ( ${_use_mc_varname} )
- foreach ( _v ${_use_mc_var} )
- string( REGEX MATCH "\\$\\((.*)\\)" _matchres "${_v}" )
- if ( _matchres)
- string ( REGEX REPLACE "\\$\\((.*)\\)" "${${CMAKE_MATCH_1}}" _new_val "${_v}" )
- list( APPEND ${_use_mc_varname} "${_new_val}" )
- else()
- list( APPEND ${_use_mc_varname} "${_v}" )
- endif()
- endforeach()
- set( ${_use_mc_varname} ${${_use_mc_varname}} PARENT_SCOPE )
- endforeach()
-endfunction()
-