python compiles directly.
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
cmake_minimum_required( VERSION 2.8 )
|
||||
project( SUNBEAM )
|
||||
enable_language( CXX )
|
||||
include( CheckCXXSourceCompiles )
|
||||
include( CTest )
|
||||
|
||||
find_package(opm-common REQUIRED)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
set( warnings "-Wall -Wextra -pedantic -Wpointer-arith" )
|
||||
@@ -15,7 +9,7 @@ set( warnings "${warnings} -Wredundant-decls" )
|
||||
set( CMAKE_CXX_FLAGS "-std=c++11 ${warnings} ${CMAKE_CXX_FLAGS}" )
|
||||
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/pycmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/python/pycmake)
|
||||
|
||||
option( USE_RPATH "Embed RPATH in libraries and binaries" OFF)
|
||||
if (USE_RPATH)
|
||||
|
||||
@@ -15,7 +15,6 @@ pybind11_add_module(libsunbeam sunbeam.cpp
|
||||
parser.cpp)
|
||||
|
||||
set_target_properties( libsunbeam PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/python/sunbeam )
|
||||
include_directories( ${opm-common_INCLUDE_DIRS} )
|
||||
|
||||
# The cmake config files generated by opm-common are generated in a non standard
|
||||
# way and they are not fully relocatable. This creates problems when we are
|
||||
@@ -44,8 +43,8 @@ if (DEST_PREFIX)
|
||||
find_package(Boost REQUIRED COMPONENTS filesystem regex)
|
||||
target_link_libraries(libsunbeam PRIVATE ecl)
|
||||
target_link_libraries(libsunbeam PRIVATE ${Boost_LIBRARIES})
|
||||
target_link_libraries(libsunbeam PRIVATE ${opm-common_LIBRARY})
|
||||
target_link_libraries(libsunbeam PRIVATE opmcommon)
|
||||
else()
|
||||
target_link_libraries( libsunbeam PRIVATE ${opm-common_LIBRARIES} )
|
||||
target_link_libraries( libsunbeam PRIVATE opmcommon )
|
||||
endif()
|
||||
install(TARGETS libsunbeam DESTINATION ${PYTHON_INSTALL_PREFIX}/sunbeam)
|
||||
|
||||
Reference in New Issue
Block a user