Sha256: e8023acd6061254576a6022651a0cbcd1c8d9ebe1105901bc22960b06b595cd2

Contents?: true

Size: 519 Bytes

Versions: 68

Compression:

Stored size: 519 Bytes

Contents

# - Append compiler flag to CMAKE_C_FLAGS if compiler supports it
# ADD_C_FLAG_IF_SUPPORTED(<flag>)
#  <flag> - the compiler flag to test
# This internally calls the CHECK_C_COMPILER_FLAG macro.

INCLUDE(CheckCCompilerFlag)

MACRO(ADD_C_FLAG_IF_SUPPORTED _FLAG)
	STRING(TOUPPER ${_FLAG} UPCASE)
	STRING(REGEX REPLACE "^-" "" UPCASE_PRETTY ${UPCASE}) 
	CHECK_C_COMPILER_FLAG(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)

	IF(IS_${UPCASE_PRETTY}_SUPPORTED)
		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}")
	ENDIF()
ENDMACRO()

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
rugged-0.27.10.1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.9 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.7 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.5 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.7 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.6 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.4 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.2 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.27.0 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.3 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0b5 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0b4 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0b3 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0b2 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.26.0b1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.25.1.1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.24.6.1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake
rugged-0.25.1 vendor/libgit2/cmake/Modules/AddCFlagIfSupported.cmake