summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTin Huynh <ahuynh@nvidia.com>2020-07-16 23:06:33 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-22 11:26:01 (GMT)
commit52eee1938919deb59cc2b51d44f365f0d9a418e5 (patch)
tree9582b616acdad14bc48592cb6a4765f3e8688670 /Modules
parentc7b7547d8da6b9a4225d111440d0cf6c2f55914d (diff)
downloadCMake-52eee1938919deb59cc2b51d44f365f0d9a418e5.zip
CMake-52eee1938919deb59cc2b51d44f365f0d9a418e5.tar.gz
CMake-52eee1938919deb59cc2b51d44f365f0d9a418e5.tar.bz2
PGI: Remove -A from the C++ flags we use when CXX_EXTENSIONS is OFF
Since commit 9b97cb5562 (PGI: Add language standards for PGI, 2017-05-01, v3.9.0-rc1~174^2), we have passed the `-A` flag to the PGI C++ compiler when specifying a C++ standard flag with compiler extensions turned off. The flag is not meant for that. The PGI C++ standard flags do not turn extensions on by default and have a separate `--gnu_extensions` flag for that which we already use when CXX_EXTENSIONS is ON. Simply drop the `-A` flag. Fixes: #20997
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/PGI-CXX.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/Compiler/PGI-CXX.cmake b/Modules/Compiler/PGI-CXX.cmake
index c77de36..2d7a303 100644
--- a/Modules/Compiler/PGI-CXX.cmake
+++ b/Modules/Compiler/PGI-CXX.cmake
@@ -4,19 +4,19 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10)
- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION -A)
+ set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION --gnu_extensions)
set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.10)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11 -A)
+ set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11)
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION --c++11 --gnu_extensions)
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.7)
- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14 -A)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14)
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION --c++14 --gnu_extensions)
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1)
- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17 -A)
+ set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17)
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION --c++17 --gnu_extensions)
set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON)
endif()