From ef6a3cfaf3693dd684790f2a6b4eff1fb5265307 Mon Sep 17 00:00:00 2001 From: Benjamin Renard <benjamin.renard@akka.eu> Date: Wed, 30 May 2018 09:12:21 +0200 Subject: [PATCH] Add DDadmin compilation --- CMakeLists.txt | 1 + compilAndInstall.sh | 2 +- src/DDADMIN/CMakeLists.txt | 25 +++++++++++++++++++++++++ src/DDADMIN/DDadmin.c | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/DDADMIN/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c495fc3..1fdcc86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ add_subdirectory(src/DECODERS/nc2nc) add_subdirectory(src/DECODERS/themis) add_subdirectory(src/DATA/TOOLS) add_subdirectory(src/DDSERVICES/TOOLS) +add_subdirectory(src/DDADMIN) add_subdirectory(tests) install(FILES "scripts/StartServer" DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/compilAndInstall.sh b/compilAndInstall.sh index 1193fef..0bfa2eb 100755 --- a/compilAndInstall.sh +++ b/compilAndInstall.sh @@ -5,7 +5,7 @@ usage=" \n \n Usage : $0 -d <Destination path> -u <DDService URL> -r <DD.res directory path> -b <DDBASE path> [-l <User local directory. By default, it's /usr/local>] [-p <Proxy host:port>] [-a <Proxy user name:password for authentication>] \n - \n $0 -d /opt/tools/DDServer -u http://amdadev.fr/DDService -r /var/amda-data/ -b /var/amda-data/DDBASE -l /opt/local -h 'myproxy.fr:9090' -p 'username:userpwd' + \n $0 -d /opt/tools/DDServer -u http://amdadev.fr/DDService -r /var/amda-data/ -b /var/amda-data/DDBASE -l /opt/local -p 'myproxy.fr:9090' -a 'username:userpwd' \n \n \n ###" diff --git a/src/DDADMIN/CMakeLists.txt b/src/DDADMIN/CMakeLists.txt new file mode 100644 index 0000000..aeba620 --- /dev/null +++ b/src/DDADMIN/CMakeLists.txt @@ -0,0 +1,25 @@ + +PROJECT(DDadmin) + +include_directories( + ${DDCLIENTINCLUDE_DIR} + ${NETCDFINCLUDE_DIR} +) + +#Configuration de l'exécutable +file( + GLOB_RECURSE + source_files + ./* +) + +ADD_EXECUTABLE (DDadmin ${source_files} ) + +target_link_libraries( + DDadmin + ${CRYPT_LIBRARY} + ${DDCLIENTLIBRARY} + ${NETCDFLIBRARY} +) + +install (TARGETS DDadmin DESTINATION bin) diff --git a/src/DDADMIN/DDadmin.c b/src/DDADMIN/DDadmin.c index 64680d7..4b4b402 100755 --- a/src/DDADMIN/DDadmin.c +++ b/src/DDADMIN/DDadmin.c @@ -330,7 +330,7 @@ int GetFileInfo(t_UserFileInfo *fileInfo) { int status; - if (((status = nc_inq_unlimdim(fileInfo->ncID, (size_t *)&fileInfo->UserID)) != NC_NOERR) || + if (((status = nc_inq_unlimdim(fileInfo->ncID, (int *)&fileInfo->UserID)) != NC_NOERR) || ((status = nc_inq_dimlen(fileInfo->ncID, fileInfo->UserID, (size_t *)&fileInfo->MaxRecords)) != NC_NOERR) || ((status = nc_inq_dimid(fileInfo->ncID, NC_USER_LEN_NAME, &fileInfo->UserLenID)) != NC_NOERR) || ((status = nc_inq_dimid(fileInfo->ncID, NC_PWD_LEN_NAME, &fileInfo->PwdLenID)) != NC_NOERR) || -- libgit2 0.21.2