summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CompileFlags.cmake8
-rwxr-xr-xbootstrap29
2 files changed, 37 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index e7beb3f..b6cc783 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -75,6 +75,14 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
endif()
endif()
+if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
+ endif()
+endif()
+
# use the ansi CXX compile flag for building cmake
if (CMAKE_ANSI_CXXFLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
diff --git a/bootstrap b/bootstrap
index fe051e1..3574973 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1154,6 +1154,35 @@ if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
cmake_test_flags=
fi
+
+if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
+ # Are we SolarisStudio?
+
+ TMPFILE=`cmake_tmp_file`
+ echo '
+ #if defined(__SUNPRO_CC)
+ #include <iostream>
+ int main() { std::cout << "This is SolarisStudio" << std::endl; return 0;}
+ #endif
+ ' > ${TMPFILE}.cxx
+ cmake_cxx_compiler_is_solarisstudio=0
+ if cmake_try_run "${cmake_cxx_compiler}" \
+ "${cmake_cxx_flags} " "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
+ cmake_cxx_compiler_is_solarisstudio=1
+ fi
+ if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
+ echo "${cmake_cxx_compiler} is SolarisStudio compiler"
+ else
+ echo "${cmake_cxx_compiler} is not SolarisStudio compiler"
+ fi
+ rm -f "${TMPFILE}.cxx"
+
+ if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
+ cmake_cxx_flags="${cmake_cxx_flags} -library=stlport4"
+ fi
+fi
+
+
# Test for kwsys features
KWSYS_NAME_IS_KWSYS=0
KWSYS_BUILD_SHARED=0