ENH: Added automatic adjustment of C++ flags to include -timplicit_local and -no_implicit_include for the Compaq compiler on OSF.

This commit is contained in:
Brad King 2004-04-29 17:44:52 -04:00
parent 28f6e1b194
commit 5601afe384
1 changed files with 17 additions and 0 deletions

View File

@ -116,6 +116,23 @@ IF(CMAKE_ANSI_CFLAGS)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
ENDIF(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 # Configure the standard library header wrappers based on compiler's
# capabilities and parent project's request. Enforce 0/1 as only # capabilities and parent project's request. Enforce 0/1 as only