Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Oct 15, 2024
1 parent 8b1658e commit 16c1f72
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,26 @@ add_executable(
snmp/snmp_elem.cpp
)

add_executable(
quick-test
quick-test.cpp
)

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
target_link_libraries(iesp Threads::Threads)

include(FindPkgConfig)

if (NOT IS_WINDOWS)
add_executable(
quick-test
quick-test.cpp
)

pkg_check_modules(LIBISCSI REQUIRED libiscsi)
target_link_libraries(quick-test ${LIBISCSI_LIBRARIES})
target_include_directories(quick-test PUBLIC ${LIBISCSI_INCLUDE_DIRS})
target_compile_options(quick-test PUBLIC ${LIBISCSI_CFLAGS_OTHER})

endif (NOT IS_WINDOWS)

set(CMAKE_BUILD_TYPE RelWithDebInfo)
#set(CMAKE_BUILD_TYPE Debug)
#target_link_libraries(iesp -fsanitize=address)
Expand Down
2 changes: 1 addition & 1 deletion codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rm -f $LOGFILE
./build/iesp -b file -d $TMPIMG -L error,debug -l $LOGFILE -P $PIDFILE -f -S 1610 $DIGESTDISABLE
LINES=`snmpwalk -c public -v2c localhost:1610 -O n .iso 2> /dev/null | grep -v 'End of MIB' | wc -l`

./build/quick_test
./build/quick-test

if [ $? -ne 0 ] ; then
echo 'quick-test failed'
Expand Down
2 changes: 2 additions & 0 deletions mingw64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)

set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} /usr/lib/gcc/${TOOLCHAIN_PREFIX}/12-posix)

set(IS_WINDOWS TRUE)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Expand Down

0 comments on commit 16c1f72

Please sign in to comment.