summaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-18 08:15:15 +0000
committerJosh Blum <josh@joshknows.com>2010-03-18 08:15:15 +0000
commitd105f614477c7f2a4f24a4efc802de7eb750bd7a (patch)
tree6c5f6e615f153862e546e5fb3879a400b73bfec1 /host/CMakeLists.txt
parent5de235715b36ef9a98ea418832a5382cbf25d4d6 (diff)
parentf2a86eb6389210a8ebd475782ab707f814c6e49c (diff)
downloaduhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.tar.gz
uhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.tar.bz2
uhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
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 89f035111..60af3d0a1 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
@@ -65,6 +73,7 @@ FIND_PACKAGE(Boost 1.36 REQUIRED
date_time
filesystem
program_options
+ regex
system
thread
unit_test_framework
@@ -79,7 +88,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)
########################################################################