Created
June 4, 2014 13:59
-
-
Save utensil/16c49c72a87485a7a59d to your computer and use it in GitHub Desktop.
CMake Test
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 characters
cmake_minimum_required(VERSION 2.8) | |
macro (show variable value) | |
message("${variable} = ${value}") | |
endmacro() | |
function(join VALUES GLUE OUTPUT) | |
string (REPLACE ";" "${GLUE}" _TMP_STR "${VALUES}") | |
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE) | |
endfunction() | |
macro (show_list variable list) | |
join(${list} " " output) | |
message("${variable} = ${output}") | |
endmacro() | |
show("WIN32" ${WIN32}) | |
show("MINGW" ${MINGW}) | |
show("MSYS" ${MSYS}) | |
show("CYGWIN" ${CYGWIN}) | |
show("MSVC" ${MSVC}) | |
show("CMAKE_CXX_COMPILER" ${CMAKE_CXX_COMPILER}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on http://www.cmake.org/Wiki/CMake_Useful_Variables