Fixed help in agent genarator

parent 0de69e8b
Pipeline #13281 failed with stages
in 8 minutes and 46 seconds
......@@ -7,19 +7,17 @@ set ( VERSION_MAJOR 0 )
set ( VERSION_MINOR 0 )
# cpr requires c++11
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread" )
if(WIN32)
add_definitions( -DBOOST_ALL_NO_LIB )
set(Boost_USE_STATIC_LIBS ON)
add_definitions(-DCURL_STATICLIB)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_WIN32_WINNT=0x0501)
# add_compile_options("/std:c++11")
# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11)
else()
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
# src : main, collect functions + jsoncpp library
file ( GLOB SOURCES src/agent/*.cpp )
......@@ -39,6 +37,7 @@ option( RUN_CURL_TESTS "Set to ON to run cURL tests." OFF )
option( CURL_STATICLIB "Set to ON to generated curl statically." ON )
add_subdirectory ( lib/cpr )
include_directories ( ${CPR_INCLUDE_DIRS} )
include_directories ( ${CURL_INCLUDE_DIRS} )
# headers
......@@ -54,7 +53,7 @@ include ( "modules/boost.cmake" )
# compile
set ( CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin" )
add_executable ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${SOURCES} )
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${CURL_LIBRARIES} ${FILESYSTEM_LIB} ${SYSTEM_LIB} ${REGEX_LIB} ${PROGRAM_OPTIONS_LIB} ${CROSS_STATIC} )
target_link_libraries ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} ${CPR_LIBRARIES} ${CURL_LIBRARIES} ${FILESYSTEM_LIB} ${SYSTEM_LIB} ${REGEX_LIB} ${PROGRAM_OPTIONS_LIB} ${CROSS_STATIC} )
add_dependencies ( agent-v${VERSION_MAJOR}.${VERSION_MINOR} Boost)
......
......@@ -47,7 +47,7 @@ for i in $@; do
;;
-h|--help)
echo "Usage: ";echo "generate agent.run with the desired setup";echo "options:"
echo " -idp=N: set idpoint as N";echo" -ws=s: set webService as s "
echo " -idp=N: set idpoint as N";echo " -ws=s: set webService as s "
echo " -pch=s: set proxyConf host as s";echo " -pcp=s: set proxyConf port as s"
echo " -pcu=s: set proxyConf user as s";echo " -pcpssd=s: set proxyConf password as s"
echo " -h or --help: show this message"
......
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