- An aborted attempt at getting ZDBSP to compile with Clang on Windows. For the time being,

it fails at linking.

SVN r3987 (trunk)
This commit is contained in:
Randy Heit 2012-12-08 04:04:43 +00:00
parent c5c3465ca5
commit cdcce657d9
8 changed files with 9 additions and 11 deletions

View file

@ -99,6 +99,10 @@ if( CMAKE_COMPILER_IS_GNUCXX )
endif( PROFILE EQUAL 1 ) endif( PROFILE EQUAL 1 )
endif( CMAKE_COMPILER_IS_GNUCXX ) endif( CMAKE_COMPILER_IS_GNUCXX )
if( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
set( ALL_C_FLAGS "${ALL_C_FLAGS} -Wno-deprecated-declarations -Wno-format" )
endif( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
if( ZLIB_FOUND ) if( ZLIB_FOUND )
message( STATUS "Using system zlib" ) message( STATUS "Using system zlib" )
else( ZLIB_FOUND ) else( ZLIB_FOUND )

View file

@ -45,6 +45,8 @@ USA. */
#include <stdio.h> #include <stdio.h>
#ifdef __APPLE__ #ifdef __APPLE__
#include <strings.h> #include <strings.h>
#else
#include <string.h>
#endif #endif
/* Comment out all this code if we are using the GNU C Library, and are not /* Comment out all this code if we are using the GNU C Library, and are not

View file

@ -80,11 +80,7 @@ extern int optopt;
struct option struct option
{ {
#if defined (__STDC__) && __STDC__
const char *name; const char *name;
#else
char *name;
#endif
/* has_arg can't be an enum because some compilers complain about /* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */ type mismatches in all the code that assumes it is an int. */
int has_arg; int has_arg;

View file

@ -52,7 +52,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h>
#include <stdarg.h> #include <stdarg.h>
#include "zdbsp.h" #include "zdbsp.h"
@ -612,7 +611,7 @@ static void CheckSSE ()
HaveSSE1 = false; HaveSSE1 = false;
HaveSSE2 = false; HaveSSE2 = false;
#if defined(_MSC_VER) #if defined(_MSC_VER) && !defined(__clang__)
#ifdef _M_X64 #ifdef _M_X64
// Processors implementing AMD64 are required to support SSE2. // Processors implementing AMD64 are required to support SSE2.
@ -642,7 +641,7 @@ noid:
} }
#endif #endif
#elif defined(__GNUC__) #elif defined(__GNUC__) || defined(__clang__)
// Same as above, but for GCC // Same as above, but for GCC
asm volatile asm volatile

View file

@ -22,7 +22,6 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <math.h>
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#endif #endif

View file

@ -19,7 +19,6 @@
*/ */
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <math.h>
#include "zdbsp.h" #include "zdbsp.h"
#include "nodebuild.h" #include "nodebuild.h"

View file

@ -18,7 +18,6 @@
*/ */
#include <assert.h> #include <assert.h>
#include <math.h>
#include "zdbsp.h" #include "zdbsp.h"
#include "nodebuild.h" #include "nodebuild.h"

View file

@ -76,7 +76,7 @@ static const angle_t ANGLE_EPSILON = 5000;
void Warn (const char *format, ...); void Warn (const char *format, ...);
#if defined(_MSC_VER) && defined(_M_IX86) #if defined(_MSC_VER) && !defined(__clang__) && defined(_M_IX86)
#pragma warning (disable: 4035) #pragma warning (disable: 4035)