Merge pull request #10604 from aimotive:master

This commit is contained in:
Alexander Alekhin 2018-01-17 09:40:42 +00:00
commit 85e133a051

View File

@ -56,6 +56,15 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
endforeach()
endif()
GET_TARGET_PROPERTY(_cxx_standard ${_PCH_current_target} CXX_STANDARD)
if (_cxx_standard)
GET_TARGET_PROPERTY(_cxx_extensions ${_PCH_current_target} CXX_EXTENSIONS)
if (_cxx_extensions)
LIST(APPEND ${_out_compile_flags} "${CMAKE_CXX${_cxx_standard}_EXTENSION_COMPILE_OPTION}")
else()
LIST(APPEND ${_out_compile_flags} "${CMAKE_CXX${_cxx_standard}_STANDARD_COMPILE_OPTION}")
endif()
endif()
ELSE()
## TODO ... ? or does it work out of the box
ENDIF()