-
-
Save gglin001/c186c1fcb539c7fc953d49e736e567a5 to your computer and use it in GitHub Desktop.
Revisions
-
likema revised this gist
Oct 22, 2019 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,16 +6,16 @@ # GLIBC_VERSION - glibc version # MACRO (CHECK_GLIBC_VERSION) EXECUTE_PROCESS ( COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.so.6 OUTPUT_VARIABLE GLIBC OUTPUT_STRIP_TRAILING_WHITESPACE) GET_FILENAME_COMPONENT (GLIBC ${GLIBC} REALPATH) GET_FILENAME_COMPONENT (GLIBC_VERSION ${GLIBC} NAME) STRING (REPLACE "libc-" "" GLIBC_VERSION ${GLIBC_VERSION}) STRING (REPLACE ".so" "" GLIBC_VERSION ${GLIBC_VERSION}) IF (NOT GLIBC_VERSION MATCHES "^[0-9.]+$") MESSAGE (FATAL_ERROR "Unknown glibc version: ${GLIBC_VERSION}") ENDIF (NOT GLIBC_VERSION MATCHES "^[0-9.]+$") ENDMACRO (CHECK_GLIBC_VERSION) -
likema revised this gist
Oct 22, 2019 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,10 @@ # - Check glibc version # CHECK_GLIBC_VERSION() # # Once done this will define # # GLIBC_VERSION - glibc version # MACRO (CHECK_GLIBC_VERSION) EXECUTE_PROCESS ( COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.so.6 -
likema created this gist
Mar 2, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ MACRO (CHECK_GLIBC_VERSION) EXECUTE_PROCESS ( COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.so.6 OUTPUT_VARIABLE GLIBC OUTPUT_STRIP_TRAILING_WHITESPACE) GET_FILENAME_COMPONENT (GLIBC ${GLIBC} REALPATH) GET_FILENAME_COMPONENT (GLIBC_VERSION ${GLIBC} NAME) STRING (REPLACE "libc-" "" GLIBC_VERSION ${GLIBC_VERSION}) STRING (REPLACE ".so" "" GLIBC_VERSION ${GLIBC_VERSION}) IF (NOT GLIBC_VERSION MATCHES "^[0-9.]+$") MESSAGE (FATAL_ERROR "Unknown glibc version: ${GLIBC_VERSION}") ENDIF (NOT GLIBC_VERSION MATCHES "^[0-9.]+$") ENDMACRO (CHECK_GLIBC_VERSION)