Skip to content

Commit

Permalink
cmake refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoes committed Mar 30, 2020
1 parent 72eef70 commit 1c522f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ endif()
option(BUILD_SHARED "Build shared library" ON)
option(BUILD_STATIC "Build static library" ON)

if(${BUILD_CONTAINED_PYTHON})
#if make a mostly statically linked python module, use static boost
set(BUILD_STATIC ON)
set(Boost_USE_STATIC_LIBS ON)
endif()

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules;${PROJECT_SOURCE_DIR}/cmake")
# get git hash
include(cmake/git_revision.cmake)
Expand Down Expand Up @@ -43,10 +49,6 @@ configure_file (
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CUDA_STANDARD 14)

if(${BUILD_CONTAINED_PYTHON})
set(BUILD_STATIC ON)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Werror")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


#Prep ourselves for compiling boost
set(Boost_USE_STATIC_LIBS OFF) #unit_test_framework has to be shared
find_package(Boost COMPONENTS unit_test_framework system REQUIRED)
include_directories (${Boost_INCLUDE_DIRS})

Expand Down

0 comments on commit 1c522f7

Please sign in to comment.