[llvm-commits] [llvm] r58434 - /llvm/trunk/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Thu Oct 30 10:15:55 PDT 2008
Author: ofv
Date: Thu Oct 30 12:15:54 2008
New Revision: 58434
URL: http://llvm.org/viewvc/llvm-project?rev=58434&view=rev
Log:
CMake: Cygwin pretends to be Unix.
Patch by Jay Foad.
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=58434&r1=58433&r2=58434&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Oct 30 12:15:54 2008
@@ -31,8 +31,13 @@
)
if(WIN32)
- set(LLVM_ON_WIN32 1)
- set(LLVM_ON_UNIX 0)
+ if(CYGWIN)
+ set(LLVM_ON_WIN32 0)
+ set(LLVM_ON_UNIX 1)
+ else(CYGWIN)
+ set(LLVM_ON_WIN32 1)
+ set(LLVM_ON_UNIX 0)
+ endif(CYGWIN)
set(LTDL_SHLIB_EXT ".dll")
set(EXEEXT ".exe")
# Maximum path length is 160 for non-unicode paths
@@ -65,7 +70,10 @@
# set(CMAKE_VERBOSE_MAKEFILE true)
add_definitions( -D__STDC_LIMIT_MACROS )
-add_definitions( -D__STDC_CONSTANT_MACROS )
+add_definitions( -D__STDC_CONSTANT_MACROS -m32 )
+
+set( CMAKE_EXE_LINKER_FLAGS "-m32 ${CMAKE_EXE_LINKER_FLAGS}" )
+set( CMAKE_LINK_LIBRARY_FLAG "-m32 ${CMAKE_LINK_LIBRARY_FLAG}" )
if( MSVC )
add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS )
More information about the llvm-commits
mailing list