Skip to content

Instantly share code, notes, and snippets.

@branan
Created October 20, 2016 05:38
Show Gist options
  • Save branan/8c6071df319dce723b6b2e2fbf5b48e0 to your computer and use it in GitHub Desktop.
Save branan/8c6071df319dce723b6b2e2fbf5b48e0 to your computer and use it in GitHub Desktop.
diff --git a/cmake/cflags.cmake b/cmake/cflags.cmake
index a1b1b6d..b588e91 100644
--- a/cmake/cflags.cmake
+++ b/cmake/cflags.cmake
@@ -47,10 +47,15 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()
# On Windows with GCC 5.2.0, disable deprecated declarations because it causes warnings with Boost's use of auto_ptr
- if (WIN32)
+ # On Solaris 12, <insert reason here>
+ if (WIN32 OR ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS" AND true)) # Check for SunOS >= 5.12 here
set(LEATHERMAN_CXX_FLAGS "${LEATHERMAN_CXX_FLAGS} -Wno-deprecated-declarations")
endif()
+ if ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS" AND true) #how do we check that version is >= 12?
+ set(LEATHERMAN_CXX_FLAGS "${LEATHERMAN_CXX_FLAGS} -pthread")
+ endif()
+
# On unix systems we want to be sure to specify -fPIC for libraries
if (NOT WIN32)
set(LEATHERMAN_LIBRARY_FLAGS "-fPIC -nostdlib -nodefaultlibs")
@@ -58,6 +63,10 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
#set(LEATHERMAN_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
+ # Solaris Studio!
+ # TODO: warning/error options
+ set(LEATHERMAN_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -mt -fPIC")
endif()
# Add code coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment