summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-04-29 21:44:52 (GMT)
committerBrad King <brad.king@kitware.com>2004-04-29 21:44:52 (GMT)
commit5601afe384c61914cce3f2bae84a9d52ca8b2df5 (patch)
treeb7feab728cac6da6b5ecb26a77db2fed089d78ec /Source
parent28f6e1b194cd71af7308cd2c91b438d8de72bc0d (diff)
downloadCMake-5601afe384c61914cce3f2bae84a9d52ca8b2df5.zip
CMake-5601afe384c61914cce3f2bae84a9d52ca8b2df5.tar.gz
CMake-5601afe384c61914cce3f2bae84a9d52ca8b2df5.tar.bz2
ENH: Added automatic adjustment of C++ flags to include -timplicit_local and -no_implicit_include for the Compaq compiler on OSF.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index e6bb3f2..42b0b22 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -117,6 +117,23 @@ IF(CMAKE_ANSI_CFLAGS)
ENDIF(CMAKE_ANSI_CFLAGS)
#-----------------------------------------------------------------------------
+# Adjust compiler flags for some platforms.
+IF(NOT CMAKE_COMPILER_IS_GNUCXX)
+ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ STRING(REGEX MATCH "-timplicit_local"
+ KWSYS_CXX_FLAGS_HAVE_IMPLICIT_LOCAL "${CMAKE_CXX_FLAGS}")
+ STRING(REGEX MATCH "-no_implicit_include"
+ KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE "${CMAKE_CXX_FLAGS}")
+ IF(NOT KWSYS_CXX_FLAGS_HAVE_IMPLICIT_LOCAL)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local")
+ ENDIF(NOT KWSYS_CXX_FLAGS_HAVE_IMPLICIT_LOCAL)
+ IF(NOT KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no_implicit_include")
+ ENDIF(NOT KWSYS_CXX_FLAGS_HAVE_NO_IMPLICIT_INCLUDE)
+ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
+
+#-----------------------------------------------------------------------------
# Configure the standard library header wrappers based on compiler's
# capabilities and parent project's request. Enforce 0/1 as only
# possible values for configuration into Configure.hxx.