Skip to content

Instantly share code, notes, and snippets.

@mcleary
Created August 29, 2017 21:42
Show Gist options
  • Save mcleary/59ce1c667d1b3df08ea831e31f7941f2 to your computer and use it in GitHub Desktop.
Save mcleary/59ce1c667d1b3df08ea831e31f7941f2 to your computer and use it in GitHub Desktop.
How to print the compiler definitions in a CMake project
get_directory_property( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
foreach( d ${DirDefs} )
message( STATUS "Found Define: " ${d} )
endforeach()
#message( STATUS "DirDefs: " ${DirDefs} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment