Skip to content

Commit

Permalink
Fixes for conda build.
Browse files Browse the repository at this point in the history
  • Loading branch information
swainn committed May 4, 2018
1 parent d717a2d commit bbae638
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
21 changes: 5 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set(CMAKE_CXX_STANDARD 11)
set(POSITION_INDEPENDENT_CODE True)
cmake_minimum_required(VERSION 3.1.2)
cmake_policy(SET CMP0015 NEW) # Link Directory Pathing
set(CMAKE_DEBUG_POSTFIX _d)
Expand All @@ -18,12 +20,9 @@ endif()

IF(IS_CONDA_BUILD)
include(${CMAKE_CURRENT_LIST_DIR}/condabuildinfo.cmake)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()

ELSE() # If we are not using conda, we are using conan
# C++11 Support
set (CMAKE_CXX_STANDARD 11)

# Conan setup
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
Expand Down Expand Up @@ -121,14 +120,6 @@ if(BUILD_TESTING)
else()
set(RUNNERNAME "runner")
endif()

# install(
# FILES "${CMAKE_BINARY_DIR}/${RUNNERNAME}"
# DESTINATION "bin"
# PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE
# OWNER_READ GROUP_READ
# OWNER_WRITE GROUP_WRITE
# )
endif()
endif()

Expand All @@ -143,10 +134,8 @@ target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
${CMAKE_THREAD_LIBS_INIT}
)
if(NOT WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_FLAGS "-fPIC"
)
if(UNIX AND NOT APPLE)
target_link_libraries(${PROJECT_NAME} rt)
endif()

# Install recipe
Expand Down
2 changes: 1 addition & 1 deletion condabuildinfo.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
set(Boost_USE_STATIC_LIBS TRUE)
find_package(Boost REQUIRED log_setup log timer)
find_package(Boost REQUIRED log_setup log timer thread)
set(EXT_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
set(EXT_LIB_DIRS ${Boost_LIBRARY_DIRS})
set(EXT_LIBS ${Boost_LIBRARIES})

0 comments on commit bbae638

Please sign in to comment.