Autotools.cmake.in 3.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
############################################################################
# Autotools.cmake.in
# Copyright (C) 2014  Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 21 22
#
############################################################################

23 24
if("@CMAKE_C_COMPILER_ID@" STREQUAL "GNU")
	string(REGEX REPLACE "gcc$" "as" AS_COMPILER "@CMAKE_C_COMPILER@")
25 26 27 28
	if (AS_COMPILER STREQUAL "@CMAKE_C_COMPILER@")
		#fallback for the case where gcc is found as /usr/bin/cc
		string(REGEX REPLACE "cc$" "as" AS_COMPILER "@CMAKE_C_COMPILER@")
	endif()
29 30
	set(AUTOTOOLS_AS_COMPILER ${AS_COMPILER} CACHE PATH "Initial cache" FORCE)
endif()
Ghislain MARY's avatar
Ghislain MARY committed
31 32 33 34 35 36 37 38 39 40 41
set(C_LAUNCHER "")
set(CXX_LAUNCHER "")
if(NOT "@CMAKE_C_COMPILER_LAUNCHER@" STREQUAL "")
       set(C_LAUNCHER "@CMAKE_C_COMPILER_LAUNCHER@ ")
endif()
if(NOT "@CMAKE_CXX_COMPILER_LAUNCHER@" STREQUAL "")
       set(CXX_LAUNCHER "@CMAKE_CXX_COMPILER_LAUNCHER@ ")
endif()
set(AUTOTOOLS_C_COMPILER "${C_LAUNCHER}@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER "${CXX_LAUNCHER}@CMAKE_CXX_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER "${C_LAUNCHER}@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
42 43 44 45 46
set(AUTOTOOLS_LINKER "@CMAKE_LINKER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_AR "@CMAKE_AR@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_RANLIB "@CMAKE_RANLIB@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_STRIP "@CMAKE_STRIP@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_NM "@CMAKE_NM@" CACHE PATH "Initial cache" FORCE)
47 48 49
set(AUTOTOOLS_C_COMPILER_NO_LAUNCHER "@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER_NO_LAUNCHER "@CMAKE_CXX_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER_NO_LAUNCHER "@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
50

51
set(AUTOTOOLS_AS_FLAGS "@AUTOTOOLS_AS_FLAGS@" CACHE STRING "Initial cache" FORCE)
52
set(AUTOTOOLS_C_FLAGS "@AUTOTOOLS_C_FLAGS@" CACHE STRING "Initial cache" FORCE)
53
set(AUTOTOOLS_CPP_FLAGS "@AUTOTOOLS_CPP_FLAGS@" CACHE STRING "Initial cache" FORCE)
54
set(AUTOTOOLS_CXX_FLAGS "@AUTOTOOLS_CXX_FLAGS@" CACHE STRING "Initial cache" FORCE)
55
set(AUTOTOOLS_OBJC_FLAGS "@AUTOTOOLS_OBJC_FLAGS@" CACHE STRING "Initial cache" FORCE)
56
set(AUTOTOOLS_LINKER_FLAGS "@AUTOTOOLS_LINKER_FLAGS@" CACHE STRING "Initial cache" FORCE)
57