summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-17 17:55:20 -0800
committerJosh Blum <josh@joshknows.com>2010-03-17 17:55:20 -0800
commit69aaffa6d8d4614dbf6b751fe058e39fced68153 (patch)
tree1a3958527b79eeb0297146dccff7fd76b0f46a7f /host/CMakeLists.txt
parent83c463d09613b72817a837117c5f0b23975c8def (diff)
downloaduhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.tar.gz
uhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.tar.bz2
uhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.zip
got uhd almost compiling in windowze. figured out special flags. also had to use boost stdint because its missing in visual c++, added a bunch of numeric casts to reduce warnings
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt19
1 files changed, 14 insertions, 5 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 30f4789a3..3576a690f 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -53,10 +53,18 @@ FUNCTION(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG flag have)
ENDIF(${have})
ENDFUNCTION(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG)
-UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wall HAVE_WALL)
-UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wextra HAVE_WEXTRA)
-UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-pedantic HAVE_PEDANTIC)
-UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-ansi HAVE_ANSI)
+IF(UNIX)
+ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wall HAVE_WALL)
+ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-Wextra HAVE_WEXTRA)
+ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-pedantic HAVE_PEDANTIC)
+ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-ansi HAVE_ANSI)
+ENDIF(UNIX)
+
+IF(WIN32)
+ ADD_DEFINITIONS(-Dnot=! -Dand=&& -Dor=||) #logical operators
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #as requested by vs
+ ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max
+ENDIF(WIN32)
########################################################################
# Setup Boost
@@ -64,6 +72,7 @@ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-ansi HAVE_ANSI)
FIND_PACKAGE(Boost 1.36 REQUIRED
date_time
program_options
+ regex
system
thread
unit_test_framework
@@ -78,7 +87,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
INCLUDE(TestBigEndian)
TEST_BIG_ENDIAN(HAVE_BIG_ENDIAN)
IF(HAVE_BIG_ENDIAN)
- ADD_DEFINITIONS("-DHAVE_BIG_ENDIAN=/* */")
+ ADD_DEFINITIONS(-DHAVE_BIG_ENDIAN)
ENDIF(HAVE_BIG_ENDIAN)
########################################################################