kopia lustrzana https://github.com/cariboulabs/cariboulite
[build] fixups cmake threads include
rodzic
e803d0b2ea
commit
72d23dba0a
|
@ -13,7 +13,7 @@ sudo apt update
|
|||
sudo apt install gcc
|
||||
|
||||
# We used libsoapysdr-dev version 0.6.1-4+
|
||||
sudo apt install libsoapysdr-dev
|
||||
sudo apt install libsoapysdr-dev libpthread-stubs0-dev
|
||||
|
||||
# cmake version 3.15+
|
||||
sudo apt install cmake
|
||||
|
|
|
@ -15,12 +15,17 @@ set(EXTERN_LIBS ${SUPER_DIR}/zf_log/build/libzf_log.a)
|
|||
#add_compile_options(-Wall -Wextra)
|
||||
add_compile_options(-Wno-missing-braces)
|
||||
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
#Generate the static library from the sources
|
||||
add_library(io_utils STATIC ${SOURCES_LIB} ${SOURCES_PIG_LIB})
|
||||
target_include_directories(io_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(io_utils PRIVATE Threads::Threads)
|
||||
|
||||
add_executable(test_io_utils main.c)
|
||||
target_link_libraries(test_io_utils io_utils pthread ${EXTERN_LIBS})
|
||||
target_link_libraries(test_io_utils io_utils Threads::Threads ${EXTERN_LIBS})
|
||||
|
||||
#Set the location for library installation -- i.e., /usr/lib in this case
|
||||
# not really necessary in this example. Use "sudo make install" to apply
|
||||
|
|
|
@ -11,7 +11,7 @@ set(CMAKE_C_EXTENSIONS OFF)
|
|||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic-errors")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
|
||||
endif()
|
||||
|
||||
add_library(zf_log ${HEADERS} ${SOURCES})
|
||||
|
|
Ładowanie…
Reference in New Issue