Commit ed5bb70c by Celine Mercier

CMake: setting compiler higher to avoid conflicts, and linking libopenmp

parent 22a5ae72
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.9)
SET(CMAKE_C_COMPILER gcc)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
SET(PYTHONLIB "po" CACHE STRING "Location of the python site-package directory")
project (cobitools3)
set(CMAKE_BUILD_TYPE Release)
project (cobitools3 LANGUAGES C)
SET(CMAKE_C_COMPILER gcc)
set(CMAKE_BUILD_TYPE Release)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB_RECURSE CSRC "*.c")
add_library(cobitools3 SHARED obierrno.c
......@@ -62,5 +65,10 @@ add_library(cobitools3 SHARED obierrno.c
obitypes.c
array_indexer.c)
find_package(OpenMP)
if(OpenMP_C_FOUND)
target_link_libraries(cobitools3 PUBLIC OpenMP::OpenMP_C)
endif()
install(TARGETS cobitools3 DESTINATION ${PYTHONLIB})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment