diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-07 02:23:38 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-07 02:23:38 +0000 |
commit | f2e9d3ed0941dc5738149dd82d1eac158bdf0a0f (patch) | |
tree | 82a350987e32cd329ab5fe56b6dd9fbfef08230f /host/CMakeLists.txt | |
parent | 998fee6ef064f1d53a61dd0eec79276d1e85291e (diff) | |
parent | 5c2cccfe8c4a9c6c912a4d18dc1e7a6f84c79609 (diff) | |
download | uhd-f2e9d3ed0941dc5738149dd82d1eac158bdf0a0f.tar.gz uhd-f2e9d3ed0941dc5738149dd82d1eac158bdf0a0f.tar.bz2 uhd-f2e9d3ed0941dc5738149dd82d1eac158bdf0a0f.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Conflicts:
host/examples/rx_timed_samples.cpp
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r-- | host/CMakeLists.txt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index a8b89d6c5..c60372fb9 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -55,22 +55,28 @@ MACRO(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG flag have) ENDIF(${have}) ENDMACRO(UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG) -IF(UNIX) +#select the release build type by default to get optimization flags +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release") + MESSAGE(STATUS "Build type not specified: defaulting to release.") +ENDIF(NOT CMAKE_BUILD_TYPE) + +IF(CMAKE_COMPILER_IS_GNUCXX) 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) - UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-O3 HAVE_O3) #have some optimizations -ENDIF(UNIX) +ENDIF(CMAKE_COMPILER_IS_GNUCXX) -IF(WIN32) +IF(MSVC) 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) + ADD_DEFINITIONS(/arch:SSE2 /G7) #processor optimization flags +ENDIF(MSVC) ######################################################################## # Setup Boost |