Skip to content

Commit

Permalink
Remove Code to set CMake policy 0148
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Sep 27, 2024
1 parent c33ea83 commit d79d010
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
cmake_minimum_required(VERSION 3.26)

cmake_policy(SET CMP0074 NEW)
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0080 NEW)
cmake_policy(SET CMP0074 NEW) # ``find_package()`` uses ``<PackageName>_ROOT`` variables.
cmake_policy(SET CMP0077 NEW) # ``option()`` honors normal variables.
cmake_policy(SET CMP0080 NEW) # ``BundleUtilities`` cannot be included at configure time.

if(CMAKE_VERSION VERSION_GREATER "3.27.0")
cmake_policy(SET CMP0148 NEW)
endif()
# The ``FindPythonInterp`` and ``FindPythonLibs`` modules are removed.
# if(CMAKE_VERSION VERSION_GREATER "3.27.0")
# cmake_policy(SET CMP0148 NEW)
# endif()

# resolves symlinks before collapsing ../ components.
if(CMAKE_VERSION VERSION_GREATER "3.28.0")
cmake_policy(SET CMP0152 NEW)
endif()
Expand Down
26 changes: 26 additions & 0 deletions cmake/UseEbsdLib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ------------------------------------------------------------------------------
# Required EbsdLib and H5Support
# ------------------------------------------------------------------------------

if(SIMPLNX_BUILD_EBSDLIB)
find_package(H5Support REQUIRED)
find_package(EbsdLib REQUIRED)
else()

if(NOT TARGET EbsdLib::EbsdLib)

if(EXISTS "${simplnx_SOURCE_DIR}/../EbsdLib")
set(EbsdLibProj_SOURCE_DIR "${simplnx_SOURCE_DIR}/../EbsdLib")
else()
message(FATAL_ERROR "EbsdLibProj_SOURCE_DIR was not set. Where is the EbsdLib project directory. Please set the EbsdLibProj_SOURCE_DIR variable to the EbsdLib directory.")
endif()
message(STATUS "EbsdLibProj_SOURCE_DIR: ${EbsdLibProj_SOURCE_DIR}")

set(EbsdLib_ENABLE_HDF5 ON)
set(EbsdLib_USE_PARALLEL_ALGORITHMS ${SIMPLNX_ENABLE_MULTICORE})
set(EbsdLib_BUILD_H5SUPPORT ON)
set(H5Support_INCLUDE_QT_API OFF)
add_subdirectory( ${EbsdLibProj_SOURCE_DIR} ${PROJECT_BINARY_DIR}/EbsdLib)
endif()
endif()

0 comments on commit d79d010

Please sign in to comment.