Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.

The CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID variables are set to
"Borland" for older versions of the compiler.  Newer CodeGear/Embarcadero
compilers will have those variables set to "Embarcadero".  Search for lines of
code referencing both the variable name and Borland to be sure that they also
refer to Embarcadero.
This commit is contained in:
James Johnston 2015-12-03 20:42:30 +00:00
parent f3b3219c96
commit 060442c2e8
2 changed files with 5 additions and 1 deletions

View File

@ -230,7 +230,11 @@ macro(_test_compiler_hidden_visibility)
endmacro()
macro(_test_compiler_has_deprecated)
# NOTE: Some Embarcadero compilers silently compile __declspec(deprecated)
# without error, but this is not a documented feature and the attribute does
# not actually generate any warnings.
if(CMAKE_CXX_COMPILER_ID MATCHES Borland
OR CMAKE_CXX_COMPILER_ID MATCHES Embarcadero
OR CMAKE_CXX_COMPILER_ID MATCHES HP
OR GCC_TOO_OLD
OR CMAKE_CXX_COMPILER_ID MATCHES PGI

View File

@ -22,7 +22,7 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
${cxx_tests}
)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland|Embarcadero")
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS
"-DTEST_OCTOTHORPE=\"#\""
)