[mapguide-commits] r9666 - in sandbox/jng/catch2: . Server/src/UnitTesting cmake/modules
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jul 13 10:35:51 PDT 2020
Author: jng
Date: 2020-07-13 10:35:50 -0700 (Mon, 13 Jul 2020)
New Revision: 9666
Modified:
sandbox/jng/catch2/CMakeLists.txt
sandbox/jng/catch2/Server/src/UnitTesting/CMakeLists.txt
sandbox/jng/catch2/Server/src/UnitTesting/CatchHelperMacros.h
sandbox/jng/catch2/Server/src/UnitTesting/TestCoordinateSystem.cpp
sandbox/jng/catch2/cmake/modules/FindMapGuideThirdparty.cmake
Log:
Fix up linux build now that I've attempted to actually build
Modified: sandbox/jng/catch2/CMakeLists.txt
===================================================================
--- sandbox/jng/catch2/CMakeLists.txt 2020-07-13 16:36:42 UTC (rev 9665)
+++ sandbox/jng/catch2/CMakeLists.txt 2020-07-13 17:35:50 UTC (rev 9666)
@@ -82,6 +82,7 @@
set(MG_OEM_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Oem")
set(MG_OEM_ROOT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/Oem")
+set(MG_OEM_CATCH2_INCLUDE_DIR "${MG_OEM_ROOT_DIR}/catch2")
set(MG_OEM_CSMAP_INCLUDE_DIR "${MG_OEM_ROOT_DIR}/CsMap/CsMapDev/Include")
set(MG_OEM_AGG_DIR "${MG_OEM_ROOT_DIR}/agg-2.4")
set(MG_OEM_AGG_INCLUDE_DIR "${MG_OEM_AGG_DIR}/include")
Modified: sandbox/jng/catch2/Server/src/UnitTesting/CMakeLists.txt
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/CMakeLists.txt 2020-07-13 16:36:42 UTC (rev 9665)
+++ sandbox/jng/catch2/Server/src/UnitTesting/CMakeLists.txt 2020-07-13 17:35:50 UTC (rev 9666)
@@ -1,5 +1,5 @@
include_directories(${ACE_INCLUDE_DIR}
- ${CATCH2_INCLUDE_DIR}
+ ${MG_OEM_CATCH2_INCLUDE_DIR}
${XERCESC_INCLUDE_DIR}
${MG_COMMON_DIR}/Foundation
${MG_COMMON_DIR}/Geometry
Modified: sandbox/jng/catch2/Server/src/UnitTesting/CatchHelperMacros.h
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/CatchHelperMacros.h 2020-07-13 16:36:42 UTC (rev 9665)
+++ sandbox/jng/catch2/Server/src/UnitTesting/CatchHelperMacros.h 2020-07-13 17:35:50 UTC (rev 9666)
@@ -23,4 +23,4 @@
} \
catch (extype ex) { \
SAFE_RELEASE(ex); \
- }
\ No newline at end of file
+ }
Modified: sandbox/jng/catch2/Server/src/UnitTesting/TestCoordinateSystem.cpp
===================================================================
--- sandbox/jng/catch2/Server/src/UnitTesting/TestCoordinateSystem.cpp 2020-07-13 16:36:42 UTC (rev 9665)
+++ sandbox/jng/catch2/Server/src/UnitTesting/TestCoordinateSystem.cpp 2020-07-13 17:35:50 UTC (rev 9666)
@@ -120,6 +120,40 @@
}
};
+static bool SetDefaultUserDictionaryDir()
+{
+ MG_TRY()
+
+ MgCoordinateSystemFactory mgCsFactory;
+ Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
+
+ STRING defUserDictionaryDir = pCsCatalog->GetDefaultUserDictionaryDir();
+ if (defUserDictionaryDir.empty())
+ {
+ defUserDictionaryDir = MgFileUtil::GetTempPath();
+ if (defUserDictionaryDir.empty())
+ return false;
+
+ defUserDictionaryDir += L"User Geospatial Coordinate Systems/";
+ }
+
+ //create the directory to make sure, [SetUserDictionaryDir]
+ //can succeed
+ if (!MgFileUtil::PathnameExists(defUserDictionaryDir))
+ MgFileUtil::CreateDirectory(defUserDictionaryDir, false, true);
+ pCsCatalog->SetUserDictionaryDir(defUserDictionaryDir);
+
+ MG_CATCH(L"SetDefaultUserDictionaryDir")
+
+ if (NULL != mgException.p)
+ {
+ STRING errDetails = mgException->GetDetails();
+ ACE_DEBUG((LM_INFO, ACE_TEXT("Exception setting user dictionary dir: %W"), errDetails.c_str()));
+ return false;
+ }
+ return true;
+}
+
///----------------------------------------------------------------------------
/// Test Case Description:
///
@@ -491,40 +525,6 @@
///----------------------------------------------------------------------------
///
-static bool SetDefaultUserDictionaryDir()
-{
- MG_TRY()
-
- MgCoordinateSystemFactory mgCsFactory;
- Ptr<MgCoordinateSystemCatalog> pCsCatalog = mgCsFactory.GetCatalog();
-
- STRING defUserDictionaryDir = pCsCatalog->GetDefaultUserDictionaryDir();
- if (defUserDictionaryDir.empty())
- {
- defUserDictionaryDir = MgFileUtil::GetTempPath();
- if (defUserDictionaryDir.empty())
- return false;
-
- defUserDictionaryDir += L"User Geospatial Coordinate Systems/";
- }
-
- //create the directory to make sure, [SetUserDictionaryDir]
- //can succeed
- if (!MgFileUtil::PathnameExists(defUserDictionaryDir))
- MgFileUtil::CreateDirectory(defUserDictionaryDir, false, true);
- pCsCatalog->SetUserDictionaryDir(defUserDictionaryDir);
-
- MG_CATCH(L"TestCoordinateSystem.SetDefaultUserDictionaryDir")
-
- if (NULL != mgException.p)
- {
- STRING errDetails = mgException->GetDetails();
- ACE_DEBUG((LM_INFO, ACE_TEXT("Exception setting user dictionary dir: %W"), errDetails.c_str()));
- return false;
- }
- return true;
-}
-
template<
class MgCsType, class MgCsDictionaryType,
STRING (MgCsType::*GetCode)(),
Modified: sandbox/jng/catch2/cmake/modules/FindMapGuideThirdparty.cmake
===================================================================
--- sandbox/jng/catch2/cmake/modules/FindMapGuideThirdparty.cmake 2020-07-13 16:36:42 UTC (rev 9665)
+++ sandbox/jng/catch2/cmake/modules/FindMapGuideThirdparty.cmake 2020-07-13 17:35:50 UTC (rev 9666)
@@ -185,11 +185,6 @@
find_package(ZLIB REQUIRED)
endif (INTERNAL_ZLIB)
-find_path(CATCH2_INCLUDE_DIR
- NAMES "catch.hpp"
- PATHS ${MG_OEM_WORK_DIR}/catch2)
-mark_as_advanced(CATCH2_INCLUDE_DIR)
-
find_package(FDO REQUIRED)
find_package(TCLAP REQUIRED)
find_package(LinuxApt REQUIRED)
More information about the mapguide-commits
mailing list