Skip to content

Commit

Permalink
[Fixed] bugs in cmake and typo in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
luckiezhou committed Aug 13, 2018
1 parent 4fab0bb commit e8d27be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions core/algorithm/CMakeLists.txt
Expand Up @@ -95,9 +95,14 @@ if(Boost_FOUND)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.54.0 COMPONENTS python)
if(NOT Boost_FOUND)
message("[Warning] boost_python not detected by cmake, we will continue
building because sometimes cmake fails to detect an existing
boost_python library")
if(NOT "$ENV{BOOST_PYTHON_LIBNAME}" STREQUAL "")
message("boost_python not detected by cmake, trying custom lib name
$ENV{BOOST_PYTHON_LIBNAME}")
else()
message(FATAL_ERROR "boost_python not detected by cmake, try setting
environment variable $BOOST_PYTHON_LIBNAME for custom library name")
endif()
set (Boost_LIBRARIES "${Boost_LIBRARIES}-l boost_python-2.7")
endif()
ELSEIF(NOT Boost_FOUND)
MESSAGE(FATAL_ERROR "Unable to find correct Boost version. Did you set BOOST_ROOT?")
Expand Down
2 changes: 1 addition & 1 deletion core/graph/CMakeLists.txt
Expand Up @@ -61,7 +61,7 @@ if(Boost_FOUND)
find_package(Boost 1.54.0 COMPONENTS python)
if(NOT Boost_FOUND)
if(NOT "$ENV{BOOST_PYTHON_LIBNAME}" STREQUAL "")
message("boost_python node detected by cmake, trying custom lib name
message("boost_python not detected by cmake, trying custom lib name
$ENV{BOOST_PYTHON_LIBNAME}")
else()
message(FATAL_ERROR "boost_python not detected by cmake, try setting
Expand Down
4 changes: 2 additions & 2 deletions scripts/test.py
Expand Up @@ -10,14 +10,14 @@
try:
import core.mygraph
except ImportError as e:
raise RuntimeError("mygraph submodule not avaiable: {}".format(e.message))
raise RuntimeError("mygraph submodule not avaiable: {}".format(str(e)))
print("OK\n")

print("Checking c extension ...")
try:
import core.algorithm.dynamic_triad_cimpl
except ImportError as e:
raise RuntimeError("c extention not available: {}".format(e.messages))
raise RuntimeError("c extention not available: {}".format(str(e)))
print("OK\n")

print("Checking Cython modules ...")
Expand Down

0 comments on commit e8d27be

Please sign in to comment.