Skip to content

Instantly share code, notes, and snippets.

@willir
Created July 6, 2016 22:39
Show Gist options
  • Select an option

  • Save willir/28aa7f50b867044dfe2a03890be93285 to your computer and use it in GitHub Desktop.

Select an option

Save willir/28aa7f50b867044dfe2a03890be93285 to your computer and use it in GitHub Desktop.
Preinclude Headers Cmake Function
function(preinclude_header headers)
foreach(header ${ARGV})
message(STATUS "header: ${header}")
if(MSVC)
add_definitions(/FI${header})
else()
add_definitions(-include ${header})
endif()
endforeach(header)
endfunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment