Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mgiza.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hh65@login-0-3.local>2015-04-01 15:23:03 +0300
committerHieu Hoang <hh65@login-0-3.local>2015-04-01 15:23:03 +0300
commit84ef201614a8a52159d9781d60542125b3dea739 (patch)
treed2cba521336f2268d853a731c86ece544c5392ca
parent8191159541e4dd319e9b3efbda5deaa91f101289 (diff)
allow compilation when only dynamic boost libraries are present. And default compiler (cc/c++) should not be used, must use gcc/g++ instead. Compiles at NYUAD
-rw-r--r--mgizapp/CMakeLists.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/mgizapp/CMakeLists.txt b/mgizapp/CMakeLists.txt
index 7f2a593..05a6720 100644
--- a/mgizapp/CMakeLists.txt
+++ b/mgizapp/CMakeLists.txt
@@ -29,10 +29,12 @@ IF(WIN32)
OPTION( USE_64_BIT "Set to on if you want to compile Win64" OFF )
ENDIF(WIN32)
+SET(CMAKE_C_COMPILER "gcc" )
SET(CMAKE_C_FLAGS
"-O3 -DNDEBUG -DWORDINDEX_WITH_4_BYTE -DBINARY_SEARCH_FOR_TTABLE -MD -MP -MF -MT"
)
+SET(CMAKE_CXX_COMPILER "g++" )
SET(CMAKE_CXX_FLAGS
"-O3 -DNDEBUG -DWORDINDEX_WITH_4_BYTE -DBINARY_SEARCH_FOR_TTABLE -MD -MP -MF -MT"
)
@@ -54,7 +56,8 @@ set(Boost_USE_STATIC_RUNTIME OFF)
FIND_PACKAGE( Boost 1.41 COMPONENTS thread system)
- IF(Boost_FOUND)
+
+IF(Boost_FOUND)
IF (NOT _boost_IN_CACHE)
MESSAGE( "Boost found" )
message(STATUS "Boost_INCLUDE_DIR : ${Boost_INCLUDE_DIR}")
@@ -62,7 +65,19 @@ FIND_PACKAGE( Boost 1.41 COMPONENTS thread system)
LINK_DIRECTORIES ( ${Boost_LIBRARY_DIRS} )
INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} )
ELSE()
- MESSAGE(FATAL_ERROR "Boost not found, please set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables " )
+ set(Boost_USE_STATIC_LIBS OFF)
+
+ FIND_PACKAGE( Boost 1.41 COMPONENTS thread system)
+ IF(Boost_FOUND)
+ IF (NOT _boost_IN_CACHE)
+ MESSAGE( "Boost found" )
+ message(STATUS "Boost_INCLUDE_DIR : ${Boost_INCLUDE_DIR}")
+ ENDIF (NOT _boost_IN_CACHE)
+ LINK_DIRECTORIES ( ${Boost_LIBRARY_DIRS} )
+ INCLUDE_DIRECTORIES ( ${Boost_INCLUDE_DIRS} )
+ ELSE()
+ MESSAGE(FATAL_ERROR "Boost not found, please set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables " )
+ ENDIF()
ENDIF()
ADD_SUBDIRECTORY (src)