Skip to content

Commit

Permalink
add option to disable SSE build
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Dec 12, 2022
1 parent 2af9116 commit 2883ced
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(BEAGLE_OPTIMIZE_FOR_NATIVE_ARCH true)
option(BUILD_OPENCL "Build beagle with OpenCL library" ON)
option(BUILD_CUDA "Build beagle with CUDA library" ON)
option(BUILD_JNI "Build beagle with JNI library" ON)
option(BUILD_SSE "Build beagle with SSE library" ON)

# Old config.h settings

Expand Down
12 changes: 10 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,24 @@ add_executable(synthetictest

target_link_libraries(hmctest
hmsbeagle
hmsbeagle-cpu-sse
# hmsbeagle-cpu-sse
hmsbeagle-cpu
${CMAKE_DL_LIBS})

target_link_libraries(synthetictest
hmsbeagle
hmsbeagle-cpu-sse
# hmsbeagle-cpu-sse
hmsbeagle-cpu
${CMAKE_DL_LIBS})

if(BUILD_SSE)
target_link_libraries(hmctest
hmsbeagle-cpu-sse)

target_link_libraries(synthetictest
hmsbeagle-cpu-sse)
endif(BUILD_SSE)

add_test(hmctest hmctest)

#target_link_libraries(hmctest5 hmsbeagle ${CMAKE_DL_LIBS})
Expand Down
2 changes: 2 additions & 0 deletions libhmsbeagle/CPU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SET_TARGET_PROPERTIES(hmsbeagle-cpu
SUFFIX "${BEAGLE_PLUGIN_SUFFIX}"
)

if(BUILD_SSE)
add_library(hmsbeagle-cpu-sse SHARED
BeagleCPU4StateSSEImpl.h
BeagleCPU4StateSSEImpl.hpp
Expand Down Expand Up @@ -55,3 +56,4 @@ SET_TARGET_PROPERTIES(hmsbeagle-cpu-sse
SOVERSION "${BEAGLE_PLUGIN_VERSION_EXTENDED}"
SUFFIX "${BEAGLE_PLUGIN_SUFFIX}"
)
endif(BUILD_SSE)

0 comments on commit 2883ced

Please sign in to comment.