@@ -37,11 +37,11 @@ option(EbsdLib_BUILD_H5SUPPORT "Build H5Support Library" OFF)
3737
3838
3939# set project's name
40- project (EbsdLibProj VERSION 2.2 .0)
40+ project (EbsdLibProj VERSION 2.3 .0)
4141
4242
4343# Request C++17 standard, using new CMake variables.
44- set (CMAKE_CXX_STANDARD 17 )
44+ set (CMAKE_CXX_STANDARD 20 )
4545set (CMAKE_CXX_STANDARD_REQUIRED ON )
4646set (CMAKE_CXX_EXTENSIONS OFF )
4747
@@ -114,6 +114,13 @@ else()
114114 message (WARNING "The Eigen Library is required for some algorithms to execute. These algorithms will be disabled." )
115115endif ()
116116
117+
118+ # -----------------------------------------------------------------------
119+ # Find FMT library
120+ # -----------------------------------------------------------------------
121+ find_package (fmt CONFIG REQUIRED )
122+
123+
117124#-------------------------------------------------------------------------------
118125# Determine if we need the ghcFilesystem library
119126#-------------------------------------------------------------------------------
@@ -160,6 +167,66 @@ endif()
160167
161168include (${EbsdLibProj_SOURCE_DIR} /Source/EbsdLib/SourceList.cmake )
162169
170+
171+
172+ # ------------------------------------------------------------------------------
173+ # Check if a different Data_Archive web site is being used.
174+ # The alternate would be for the internal build bots that can download from a
175+ # local webserver
176+ # ------------------------------------------------------------------------------
177+ if ("${DATA_ARCHIVE_WEB_SITE} " STREQUAL "" )
178+ set (DATA_ARCHIVE_WEB_SITE "https://github.com/bluequartzsoftware/ebsdlib/releases/download/Data_Archive/" )
179+ endif ()
180+
181+ file (TO_CMAKE_PATH "${EBSDLIB_DATA_DIR} " EBSDLIB_DATA_DIR_NORM )
182+
183+
184+ # -----------------------------------------------------------------------
185+ # This section creates a global file that holds the commands to copy data
186+ # files, test data files, pipelines into a single cmake file that gets
187+ # generated. This reduces the many copy targets to a single target.
188+ # -----------------------------------------------------------------------
189+ set_property (GLOBAL PROPERTY FETCH_FILE_INDEX 0 )
190+ set (FETCH_FILE_PATH "${EbsdLibProj_BINARY_DIR} /EbsdLibProj_fetch_remote_files.cmake" )
191+ set_property (GLOBAL PROPERTY FETCH_FILE_PATH "${FETCH_FILE_PATH} " )
192+ file (WRITE ${FETCH_FILE_PATH} "# -----------------------------------------------------------------------
193+ # This file is programmatically generated from the CMake file ${CMAKE_CURRENT_LIST_FILE}
194+ # This file has the commands to download each of the test files.
195+ # The WORKING_DIRECTORY is set to the following CMake code:
196+ # ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} /$<$<CONFIG :Debug >:Debug >$<$<CONFIG :Release >:Release >
197+ # -----------------------------------------------------------------------\n
198+ cmake_policy(SET CMP0012 NEW)
199+ cmake_policy(SET CMP0054 NEW)
200+ # The ``FindPythonInterp`` and ``FindPythonLibs`` modules are removed.
201+ # if(CMAKE_VERSION VERSION_GREATER \" 3.27.0\" )
202+ # cmake_policy(SET CMP0148 NEW)
203+ # endif()
204+ # resolves symlinks before collapsing ../ components.
205+ if(CMAKE_VERSION VERSION_GREATER \" 3.28.0\" )
206+ cmake_policy(SET CMP0152 NEW)
207+ endif()
208+ set(CONFIG \$ {CMAKE_CONFIG})
209+ set(LOG_FILE \" ${EbsdLibProj_BINARY_DIR} /EbsdLibProj_fetch_remote_files.log\" )\n
210+ FILE(WRITE \"\$ {LOG_FILE}\" \" Featch File Log Start\n\" )\n
211+ " )
212+
213+ message (STATUS "FETCH_FILE_PATH: ${FETCH_FILE_PATH} " )
214+
215+ set (TEST_WORKING_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} " )
216+ if (CMAKE_GENERATOR MATCHES "Visual Studio" )
217+ set (TEST_WORKING_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} /$<$<CONFIG :Debug >:Debug >$<$<CONFIG :Release >:Release >" )
218+ endif ()
219+
220+ if (EBSDLIB_DOWNLOAD_TEST_FILES)
221+ add_custom_target (EbsdLib_Fetch_Remote_Data_Files ALL
222+ COMMAND "${CMAKE_COMMAND} " -DCMAKE_CONFIG=$<CONFIG> -P "${FETCH_FILE_PATH} "
223+ COMMENT "Downloading EbsdLib Test Data Files"
224+ # WORKING_DIRECTORY "${TEST_WORKING_DIR}"
225+ )
226+ set_target_properties (EbsdLib_Fetch_Remote_Data_Files PROPERTIES FOLDER ZZ_FETCH_TEST_FILES )
227+ endif ()
228+
229+
163230# ------------------------------------------------------------------------------
164231# Build Unit Test
165232# ------------------------------------------------------------------------------
0 commit comments