diff --git a/CMakeLists.txt b/CMakeLists.txt index daf3278..090a3b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,11 +35,6 @@ 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) @@ -47,11 +42,19 @@ 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) diff --git a/codecov.sh b/codecov.sh index c15dafe..7414b8b 100755 --- a/codecov.sh +++ b/codecov.sh @@ -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' diff --git a/mingw64.cmake b/mingw64.cmake index ab2f026..d0b5d94 100644 --- a/mingw64.cmake +++ b/mingw64.cmake @@ -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)