Created
July 18, 2016 13:24
-
-
Save robertmaynard/e788f040564fe4455a37d784476f7081 to your computer and use it in GitHub Desktop.
This file contains 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 3.1) | |
#### | |
## Function | |
### | |
function( add_source_flags file ) | |
set_property( | |
SOURCE ${file} | |
APPEND PROPERTY COMPILE_FLAGS "/wd4068" ) | |
endfunction() | |
set( srcs main.cpp ) | |
add_source_flags( "main.cpp" ) | |
get_property( prop_value | |
SOURCE main.cpp | |
PROPERTY COMPILE_FLAGS ) | |
message(STATUS "COMPILE_FLAGS on main.cpp: ${prop_value}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment