Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 13 Apr 2009 17:58:35 -0400
changeset 989 70132355a297
parent 988 27a1fb1cdc47
child 990 c25717b5c165
Ignore empty files (like #ifdef'd out platform code) on Sun Studio compiler.
CMakeLists.txt
--- a/CMakeLists.txt	Mon Apr 13 17:57:56 2009 -0400
+++ b/CMakeLists.txt	Mon Apr 13 17:58:35 2009 -0400
@@ -73,6 +73,10 @@
     ENDIF(PHYSFS_IS_GCC4)
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
 
+IF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
+    ADD_DEFINITIONS(-erroff=E_EMPTY_TRANSLATION_UNIT)
+ENDIF(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
+
 IF(MSVC)
     # VS.NET 8.0 got really really anal about strcpy, etc, which even if we
     #  cleaned up our code, zlib, etc still use...so disable the warning.