diff options
author | James Johnston <johnstonj.public@codenest.com> | 2015-12-03 20:42:30 (GMT) |
---|---|---|
committer | James Johnston <johnstonj.public@codenest.com> | 2015-12-03 21:37:06 (GMT) |
commit | 060442c2e866c44ecf0c479e49e1d5ae35e8c6fb (patch) | |
tree | aca321811274ab7e8a4348443576d39ec31a6d5a | |
parent | f3b3219c9687e54a83dc7e5dabb0afc4637bb799 (diff) | |
download | CMake-060442c2e866c44ecf0c479e49e1d5ae35e8c6fb.zip CMake-060442c2e866c44ecf0c479e49e1d5ae35e8c6fb.tar.gz CMake-060442c2e866c44ecf0c479e49e1d5ae35e8c6fb.tar.bz2 |
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.
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 4 | ||||
-rw-r--r-- | Tests/CompileOptions/CMakeLists.txt | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 8205425..4f4efbc 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -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 diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 05a5f82..692e0de 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -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=\"#\"" ) |