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:
parent
f3b3219c96
commit
060442c2e8
|
@ -230,7 +230,11 @@ macro(_test_compiler_hidden_visibility)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(_test_compiler_has_deprecated)
|
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
|
if(CMAKE_CXX_COMPILER_ID MATCHES Borland
|
||||||
|
OR CMAKE_CXX_COMPILER_ID MATCHES Embarcadero
|
||||||
OR CMAKE_CXX_COMPILER_ID MATCHES HP
|
OR CMAKE_CXX_COMPILER_ID MATCHES HP
|
||||||
OR GCC_TOO_OLD
|
OR GCC_TOO_OLD
|
||||||
OR CMAKE_CXX_COMPILER_ID MATCHES PGI
|
OR CMAKE_CXX_COMPILER_ID MATCHES PGI
|
||||||
|
|
|
@ -22,7 +22,7 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
|
||||||
${cxx_tests}
|
${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
|
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS
|
||||||
"-DTEST_OCTOTHORPE=\"#\""
|
"-DTEST_OCTOTHORPE=\"#\""
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue