From 460708a015d455aea9e2f362cdae71711703f6cf Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:10:16 +0100 Subject: [PATCH 01/10] Changed: Use L:/ path instead of R:/ for leveldesign --HG-- branch : develop --- .../world_editor_classes.xml | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index d9aae794a..6e24cafe3 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -98,7 +98,7 @@ - + @@ -128,7 +128,7 @@ @@ -147,7 +147,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -175,7 +175,7 @@ - + @@ -2100,7 +2100,7 @@ - + @@ -2140,7 +2140,7 @@ - + @@ -2155,7 +2155,7 @@ - + @@ -2169,7 +2169,7 @@ - + @@ -2185,7 +2185,7 @@ - + @@ -2513,10 +2513,10 @@ --> - + - + @@ -2720,10 +2720,10 @@ --> - + - + @@ -2761,10 +2761,10 @@ --> - + - + @@ -2802,10 +2802,10 @@ --> - + - + @@ -2828,10 +2828,10 @@ - + - + @@ -2869,7 +2869,7 @@ - + @@ -2888,7 +2888,7 @@ - + @@ -2907,7 +2907,7 @@ - + @@ -2924,7 +2924,7 @@ - + @@ -3662,7 +3662,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -3765,7 +3765,7 @@ - + @@ -3866,7 +3866,7 @@ --> - + @@ -3991,7 +3991,7 @@ --> - + - + - + @@ -4052,7 +4052,7 @@ --> - + @@ -4098,7 +4098,7 @@ - + @@ -4493,7 +4493,7 @@ --> - + @@ -4635,7 +4635,7 @@ - + @@ -4670,7 +4670,7 @@ - + @@ -4704,7 +4704,7 @@ --> - + @@ -4738,7 +4738,7 @@ --> - + From aa15b961879568184529ee571283442affa84442 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:10:48 +0100 Subject: [PATCH 02/10] Changed: Add a 7 seconds pause under UNIX --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 3d73635f9..8d4088d13 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -3157,7 +3157,8 @@ bool CPatchManager::extract(const std::string& patchPath, fprintf(fp, "@echo off\n"); fprintf(fp, "ping 127.0.0.1 -n 7 -w 1000 > nul\n"); // wait #else - // TODO: for Linux and OS X + fprintf(fp, "#!/bin/sh\n"); + fprintf(fp, "sleep 7\n"); // wait #endif // Unpack files with category ExtractPath non empty From 4b023d1acee858d63f54761c8cfdcc5c79f35ee7 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:13:28 +0100 Subject: [PATCH 03/10] Changed: Renamed DSTPATH to ROOTPATH and SRCPATH to UNPACKPATH and fixed paths with spaces --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 60 +++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 8d4088d13..40ab45af5 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -818,12 +818,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool #ifdef NL_OS_WINDOWS // only fix backslashes for .bat batchRelativeDstPath = CPath::standardizeDosPath(batchRelativeDstPath); -#endif - // write windows .bat format else write sh format -#ifdef NL_OS_WINDOWS - string realDstPath = toString("\"%%DSTPATH%%\\%s\"", batchRelativeDstPath.c_str()); - string realSrcPath = toString("\"%%SRCPATH%%\\%s\"", FileName.c_str()); + // use DSTPATH and SRCPATH variables and append filenames + string realDstPath = toString("\"%%ROOTPATH%%\\%s\"", batchRelativeDstPath.c_str()); + string realSrcPath = toString("\"%%UNPACKPATH%%\\%s\"", FileName.c_str()); content += toString(":loop%u\n", nblab); content += toString("attrib -r -a -s -h %s\n", realDstPath.c_str()); @@ -831,6 +829,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool content += toString("if exist %s goto loop%u\n", realDstPath.c_str(), nblab); content += toString("move %s %s\n", realSrcPath.c_str(), realDstPath.c_str()); #else + // use DSTPATH and SRCPATH variables and append filenames + string realDstPath = toString("\"$ROOTPATH\\%s\"", batchRelativeDstPath.c_str()); + string realSrcPath = toString("\"$UNPACKPATH\\%s\"", FileName.c_str()); + content += toString("rm -rf %s\n", realDstPath.c_str()); // TODO: add test of returned $? content += toString("mv %s %s\n", realSrcPath.c_str(), realDstPath.c_str()); @@ -869,9 +871,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (!succeeded) { #ifdef NL_OS_WINDOWS - patchContent += toString("del \"%s\"\n", CPath::standardizeDosPath(vFileList[i]).c_str()); + patchContent += toString("del \"%%ROOTPATH%%\\patch\\%s\"\n", vFileList[i].c_str()); #else - patchContent += toString("rm -f \"%s\"\n", CPath::standardizePath(vFileList[i]).c_str()); + patchContent += toString("rm -f \"$ROOTPATH/patch/%s\"\n", vFileList[i].c_str()); #endif } } @@ -883,10 +885,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool content += patchContent; - content += toString("rd /Q /S \"%s\"\n", patchDirectory.c_str()); - content += toString("if exist \"%s\" goto looppatch\n", patchDirectory.c_str()); + content += "rd /Q /S \"%%ROOTPATH%%\\patch\"\n"; + content += "if exist \"%%ROOTPATH%%\\patch\" goto looppatch\n"; #else - content += toString("rm -rf \"%s\"\n", patchDirectory.c_str()); + content += "rm -rf \"$ROOTPATH/patch\"\n"); #endif } else @@ -914,22 +916,22 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool //use bat if windows if not use sh #ifdef NL_OS_WINDOWS contentPrefix += "@echo off\n"; - contentPrefix += "set RYZOM_CLIENT=%1\n"; - contentPrefix += "set SRCPATH=%2\n"; - contentPrefix += "set DSTPATH=%3\n"; + contentPrefix += "set RYZOM_CLIENT=\"%1\"\n"; + contentPrefix += "set UNPACKPATH=\"%2\"\n"; + contentPrefix += "set ROOTPATH=\"%3\"\n"; contentPrefix += "set LOGIN=%4\n"; contentPrefix += "set PASSWORD=%5\n"; contentPrefix += "set SHARDID=%6\n"; - contentPrefix += toString("set UPGRADE_FILE=%%DSTPATH%%\\%s\n", UpgradeBatchFilename.c_str()); + contentPrefix += toString("set UPGRADE_FILE=\"%%ROOTPATH%%\\%s\"\n", UpgradeBatchFilename.c_str()); #else contentPrefix += "#!/bin/sh\n"; - contentPrefix += "RYZOM_CLIENT=$1\n"; - contentPrefix += "SRCPATH=$2\n"; - contentPrefix += "DSTPATH=$3\n"; + contentPrefix += "RYZOM_CLIENT=\"$1\"\n"; + contentPrefix += "UNPACKPATH=\"$2\"\n"; + contentPrefix += "ROOTPATH=\"$3\"\n"; contentPrefix += "LOGIN=$4\n"; contentPrefix += "PASSWORD=$5\n"; contentPrefix += "SHARDID=$6\n"; - contentPrefix += toString("UPGRADE_FILE=$DSTPATH\\%s\n", UpgradeBatchFilename.c_str()); + contentPrefix += toString("UPGRADE_FILE=\"$ROOTPATH\\%s\"\n", UpgradeBatchFilename.c_str()); #endif contentPrefix += "\n"; @@ -947,26 +949,24 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (wantRyzomRestart) { - string contentSuffix; - -#ifdef NL_OS_WINDOWS - // launch upgrade script if present (it'll execute additional steps like moving or deleting files) - contentSuffix += "if exist \"%UPGRADE_FILE%\" call \"%UPGRADE_FILE%\"\n"; - // client shouldn't be in memory anymore else it couldn't be overwritten - contentSuffix += toString("start \"\" /D \"%%DSTPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str()); + contentSuffix += toString("start \"\" /D \"%%ROOTPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str()); + } #else // wait until client not in memory anymore contentSuffix += toString("until ! pgrep %s > /dev/null; do sleep 1; done\n", CFile::getFilename(RyzomFilename).c_str()); + } - // launch upgrade script if present (it'll execute additional steps like moving or deleting files) - contentSuffix += "if [ -e \"$UPGRADE_FILE\" ]; then chmod +x \"$UPGRADE_FILE\" && \"$UPGRADE_FILE\"; fi\n"; + // launch upgrade script if present (it'll execute additional steps like moving or deleting files) + contentSuffix += "if [ -e \"$UPGRADE_FILE\" ]; then chmod +x \"$UPGRADE_FILE\" && \"$UPGRADE_FILE\"; fi\n"; - // be sure file is executable - contentSuffix += "chmod +x \"$RYZOM_CLIENT\"\n"); + // be sure file is executable + contentSuffix += "chmod +x \"$RYZOM_CLIENT\"\n"; + if (wantRyzomRestart) + { // change to previous client directory - contentSuffix += "cd \"$DSTPATH\"\n"); + contentSuffix += "cd \"$ROOTPATH\"\n"; // launch new client contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str()); From 24dda2e7b9a890b5e2460d8db6d9428868598320 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:15:29 +0100 Subject: [PATCH 04/10] Changed: Don't use SrcPath and DstPath anymore (ClientPatchPath and ClientRootPath are more explicit) --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 40ab45af5..b5ed17815 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -739,18 +739,6 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool const CBNPCategorySet &rDescCats = descFile.getCategories(); OptionalCat.clear(); - string SrcPath = ClientPatchPath; - string DstPath = ClientRootPath; - -#ifdef NL_OS_WINDOWS - // only fix backslashes for .bat - string batchSrcPath = CPath::standardizeDosPath(SrcPath); - string batchDstPath = CPath::standardizeDosPath(DstPath); -#else - string batchSrcPath = SrcPath; - string batchDstPath = DstPath; -#endif - for (uint32 i = 0; i < rDescCats.categoryCount(); ++i) { // For all optional categories check if there is a 'file to patch' in it @@ -759,14 +747,16 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (!rCat.getUnpackTo().empty()) for (uint32 j = 0; j < rCat.fileCount(); ++j) { - string rFilename = SrcPath + rCat.getFile(j); - nlwarning("\tFileName = %s", rFilename.c_str()); + string rFilename = ClientPatchPath + rCat.getFile(j); + + nlinfo("\tFileName = %s", rFilename.c_str()); + // Extract to patch vector vFilenames; bool result = false; try { - result = bnpUnpack(rFilename, SrcPath, vFilenames); + result = bnpUnpack(rFilename, ClientPatchPath, vFilenames); } catch(...) { @@ -798,7 +788,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool CFile::deleteFile(fullDstPath + FileName); // try to move it, if fails move it later in a script - if (CFile::moveFile(fullDstPath + FileName, SrcPath + FileName)) + if (CFile::moveFile(fullDstPath + FileName, ClientPatchPath + FileName)) succeeded = true; } @@ -807,9 +797,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool { string batchRelativeDstPath; - if (fullDstPath.compare(0, DstPath.length(), DstPath) == 0) + // should be always true + if (fullDstPath.compare(0, ClientRootPath.length(), ClientRootPath) == 0) { - batchRelativeDstPath = fullDstPath.substr(DstPath.length()) + FileName; + batchRelativeDstPath = fullDstPath.substr(ClientRootPath.length()) + FileName; } else { From bfe817f92c6ed266cec411a21fa833d747632a54 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:16:04 +0100 Subject: [PATCH 05/10] Changed: Minor changes --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index b5ed17815..84136b8a3 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -743,7 +743,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool { // For all optional categories check if there is a 'file to patch' in it const CBNPCategory &rCat = rDescCats.getCategory(i); - nlwarning("Category = %s", rCat.getName().c_str()); + + nlinfo("Category = %s", rCat.getName().c_str()); + if (!rCat.getUnpackTo().empty()) for (uint32 j = 0; j < rCat.fileCount(); ++j) { @@ -753,7 +755,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool // Extract to patch vector vFilenames; + bool result = false; + try { result = bnpUnpack(rFilename, ClientPatchPath, vFilenames); @@ -806,6 +810,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool { batchRelativeDstPath = fullDstPath + FileName; } + #ifdef NL_OS_WINDOWS // only fix backslashes for .bat batchRelativeDstPath = CPath::standardizeDosPath(batchRelativeDstPath); @@ -825,7 +830,6 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool string realSrcPath = toString("\"$UNPACKPATH\\%s\"", FileName.c_str()); content += toString("rm -rf %s\n", realDstPath.c_str()); - // TODO: add test of returned $? content += toString("mv %s %s\n", realSrcPath.c_str(), realDstPath.c_str()); #endif @@ -872,7 +876,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool if (!patchContent.empty()) { #ifdef NL_OS_WINDOWS - content += toString(":looppatch\n"); + content += ":looppatch\n"; content += patchContent; @@ -892,8 +896,10 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool { deleteBatchFile(); + // batch full path std::string batchFilename = ClientRootPath + UpdateBatchFilename; + // write windows .bat format else write sh format FILE *fp = nlfopen (batchFilename, "wt"); if (fp == NULL) From 9a4156d9cfbf0557454eb7c61d7647a937b2e46a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:16:50 +0100 Subject: [PATCH 06/10] Changed: Launch upgrade script even if we don't want to launch client --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 84136b8a3..852e6fb54 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -933,10 +933,9 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool contentPrefix += "\n"; - // append content of script - fputs(contentPrefix.c_str(), fp); - fputs(content.c_str(), fp); + string contentSuffix; + // if we need to restart Ryzom, we need to launch it in batch std::string additionalParams; if (Args.haveLongArg("profile")) @@ -944,12 +943,18 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool additionalParams = "--profile " + Args.getLongArg("profile").front(); } +#ifdef NL_OS_WINDOWS + // launch upgrade script if present (it'll execute additional steps like moving or deleting files) + contentSuffix += "if exist \"%UPGRADE_FILE%\" call \"%UPGRADE_FILE%\"\n"; + if (wantRyzomRestart) { // client shouldn't be in memory anymore else it couldn't be overwritten contentSuffix += toString("start \"\" /D \"%%ROOTPATH%%\" \"%%RYZOM_CLIENT%%\" %s %%LOGIN%% %%PASSWORD%% %%SHARDID%%\n", additionalParams.c_str()); } #else + if (wantRyzomRestart) + { // wait until client not in memory anymore contentSuffix += toString("until ! pgrep %s > /dev/null; do sleep 1; done\n", CFile::getFilename(RyzomFilename).c_str()); } @@ -967,10 +972,13 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool // launch new client contentSuffix += toString("\"$RYZOM_CLIENT\" %s $LOGIN $PASSWORD $SHARDID\n", additionalParams.c_str()); + } #endif - fputs(contentSuffix.c_str(), fp); - } + // append content of script + fputs(contentPrefix.c_str(), fp); + fputs(content.c_str(), fp); + fputs(contentSuffix.c_str(), fp); bool writeError = ferror(fp) != 0; bool diskFull = ferror(fp) && errno == 28 /* ENOSPC */; From 901759d039f95f87585223bff162b300b665b11f Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:17:10 +0100 Subject: [PATCH 07/10] Changed: Don't use DOS path under UNIX --HG-- branch : develop --- code/ryzom/client/src/login_patch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 852e6fb54..4dd5e5561 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -842,7 +842,7 @@ void CPatchManager::createBatchFile(CProductDescriptionForClient &descFile, bool } } - std::string patchDirectory = CPath::standardizeDosPath(ClientRootPath + "patch"); + std::string patchDirectory = CPath::standardizePath(ClientRootPath + "patch"); // Finalize batch file if (NLMISC::CFile::isExists(patchDirectory) && NLMISC::CFile::isDirectory(patchDirectory)) From d18c7b24f5a7b1a5a0210d5f6f4c1dfc5c4a248a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:19:23 +0100 Subject: [PATCH 08/10] Changed: Don't look for Qt5WinExtras in root CmakeLists.txt --HG-- branch : develop --- code/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 858af1d5c..cde43ca7d 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -253,11 +253,6 @@ IF(WITH_QT5) FIND_PACKAGE(Qt5LinguistTools) FIND_PACKAGE(Qt5Network) - IF(WIN32) - # Please add option to switch off - # FIND_PACKAGE(Qt5WinExtras) - ENDIF() - IF(QT_STATIC) ADD_DEFINITIONS(-DQT_STATICPLUGIN) From 3e14025cf82965443003de03fdfa847af4a38b88 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:19:41 +0100 Subject: [PATCH 09/10] Changed: Include wang_hash.h in NLMISC files --HG-- branch : develop --- code/nel/src/misc/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index c5fb2080e..fb6752982 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -152,6 +152,7 @@ FILE(GLOB NLMISC_BITMAP FILE(GLOB NLMISC_CRYPT md5.cpp ../../include/nel/misc/md5.h sha1.cpp ../../include/nel/misc/sha1.h + ../../include/nel/misc/wang_hash.h ) SOURCE_GROUP("" FILES ${SRC} ${HEADERS}) From f698c31aa1e57c9ccc0be5c9b3f20e688736e249 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Feb 2016 13:20:49 +0100 Subject: [PATCH 10/10] Changed: Allow to compile WITH_NEL_TESTS without compiling tools --HG-- branch : develop --- code/nel/tools/CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index cb3e2b577..8734bf103 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -3,7 +3,7 @@ ADD_SUBDIRECTORY(misc) IF(WITH_NEL_TOOLS) ADD_SUBDIRECTORY(memory) -ENDIF(WITH_NEL_TOOLS) +ENDIF() # Max plugins are under the 3d directory as well. # Allow to compile only max plugins without other tools. @@ -15,21 +15,21 @@ ENDIF() IF(WITH_NEL_TOOLS) IF(WITH_PACS) ADD_SUBDIRECTORY(pacs) - ENDIF(WITH_PACS) + ENDIF() IF(WITH_LOGIC) ADD_SUBDIRECTORY(logic) - ENDIF(WITH_LOGIC) + ENDIF() IF(WITH_GEORGES) ADD_SUBDIRECTORY(georges) - ENDIF(WITH_GEORGES) + ENDIF() IF(WITH_SOUND) ADD_SUBDIRECTORY(sound) - ENDIF(WITH_SOUND) - - IF(WITH_NEL_TESTS) - ADD_SUBDIRECTORY(nel_unit_test) - ENDIF(WITH_NEL_TESTS) -ENDIF(WITH_NEL_TOOLS) + ENDIF() +ENDIF() + +IF(WITH_NEL_TESTS) + ADD_SUBDIRECTORY(nel_unit_test) +ENDIF()