Skip to content

Commit

Permalink
Merge branch 'jschueller-openmp'
Browse files Browse the repository at this point in the history
Sheng Di committed Jul 29, 2019
2 parents 8679f3f + 250574d commit b751f1f
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ endif()
project (sz)
enable_testing()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -std=c99 -fopenmp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -fopenmp")
find_package (OpenMP REQUIRED)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)

11 changes: 6 additions & 5 deletions sz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
aux_source_directory(src sz_sources)

add_library (SZ SHARED ${sz_sources})
target_link_libraries (SZ ${ZLIB_LIBRARIES} ${ZSTD_LIBRARIES})
target_link_libraries (SZ PRIVATE ${ZLIB_LIBRARIES} ${ZSTD_LIBRARIES})
if (UNIX)
target_link_libraries (SZ m)
target_link_libraries (SZ PUBLIC m)
endif ()

target_compile_options(SZ
PRIVATE $<$<CONFIG:Debug>:-O3 -Wall -Wextra -Wpedantic -Wno-unused-parameter>
)
if (OPENMP_FOUND)
target_compile_options (SZ PRIVATE ${OpenMP_C_FLAGS})
target_link_libraries (SZ PRIVATE ${OpenMP_C_LIBRARIES})
endif ()

install (TARGETS SZ LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)

0 comments on commit b751f1f

Please sign in to comment.