Skip to content

Instantly share code, notes, and snippets.

@skyscribe
Created November 8, 2012 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skyscribe/4038764 to your computer and use it in GitHub Desktop.
Save skyscribe/4038764 to your computer and use it in GitHub Desktop.
Detect stdcxx path for customized gcc installation
cmake_minimum_required(VERSION 2.6)
macro(get_link_libraries_path extra_path)
message("Actual parameter variable is:${extra_path}")
if (CMAKE_COMPILER_IS_GNUCXX)
string(REPLACE ";" ":" ${extra_path} ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
message("implicit link libraries dir:${${extra_path}}")
endif()
endmacro()
#Test macro
get_link_libraries_path(stdcxx_path)
message("stdcxx path is:${stdcxx_path}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment