aboutsummaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorroot <root@usrp1-e.(none)>2010-03-23 13:35:36 +0000
committerroot <root@usrp1-e.(none)>2010-03-23 13:35:36 +0000
commitc329da8f953c3981e23791c688f350b27541554a (patch)
tree3447dd657bf7221e3b4b1a9147ce1bd2ffa430b9 /host/CMakeLists.txt
parentf6ec1e45117f5794facd1cd8e11cbfacabdeb166 (diff)
parent09a21dd6d4bc5b7f032e07cfabcba9f55d25b0f6 (diff)
downloaduhd-c329da8f953c3981e23791c688f350b27541554a.tar.gz
uhd-c329da8f953c3981e23791c688f350b27541554a.tar.bz2
uhd-c329da8f953c3981e23791c688f350b27541554a.zip
Merge branch 'u1e_uhd' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt32
1 files changed, 28 insertions, 4 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 70c04631b..2f5d03f7d 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -53,17 +53,32 @@ 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)
+ #only export symbols that are declared to be part of the uhd api:
+ UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
+ENDIF(UNIX)
+
+IF(WIN32)
+ ADD_DEFINITIONS(-Dnot=! -Dand=&& -Dor=||) #logical operators
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
+ ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max
+ ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) #avoid warnings from boost::split
+ ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc
+ENDIF(WIN32)
########################################################################
# Setup Boost
########################################################################
+SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42")
FIND_PACKAGE(Boost 1.36 REQUIRED
date_time
+ filesystem
program_options
+ regex
system
thread
unit_test_framework
@@ -73,6 +88,15 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
########################################################################
+# Setup Endianess
+########################################################################
+INCLUDE(TestBigEndian)
+TEST_BIG_ENDIAN(HAVE_BIG_ENDIAN)
+IF(HAVE_BIG_ENDIAN)
+ ADD_DEFINITIONS(-DHAVE_BIG_ENDIAN)
+ENDIF(HAVE_BIG_ENDIAN)
+
+########################################################################
# Create Uninstall Target
########################################################################
CONFIGURE_FILE(