@@ -38,15 +38,15 @@ if (APPLE)
3838 set (CMAKE_OSX_DEPLOYMENT_TARGET "15.0" CACHE STRING "macOS deployment target" FORCE )
3939 set (ENV{MACOSX_DEPLOYMENT_TARGET} "15.0" )
4040 message (STATUS "CMAKE_OSX_DEPLOYMENT_TARGET was unset. Defaulting to 15.0" )
41- endif ()
41+ endif ()
4242endif ()
4343
4444# Python and nanobind
4545# Normalize variables from callers and ALWAYS use FindPython (not FindPython3),
4646# because nanobind-config.cmake requires that 'find_package(Python ...)' has been invoked.
47- if (DEFINED Python3_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
47+ if (DEFINED Python3_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
4848 set (Python_EXECUTABLE "${Python3_EXECUTABLE} " )
49- endif ()
49+ endif ()
5050# Required: Python interpreter + development module
5151find_package (Python 3.12 COMPONENTS Interpreter Development.Module REQUIRED )
5252include_directories (${Python_INCLUDE_DIRS} )
@@ -56,22 +56,22 @@ execute_process(
5656 COMMAND "${Python_EXECUTABLE} " -c "import sysconfig; print(sysconfig.get_config_var('SOABI'), end='')"
5757 OUTPUT_VARIABLE Python_SOABI
5858 RESULT_VARIABLE _result )
59- if (_result EQUAL 0 AND Python_SOABI)
59+ if (_result EQUAL 0 AND Python_SOABI)
6060 set (Python_SOABI "${Python_SOABI} " CACHE STRING "Python SOABI" FORCE )
61- endif ()
61+ endif ()
6262
6363# Resolve nanobind via the chosen interpreter and help CMake find it
6464execute_process (
6565 COMMAND "${Python_EXECUTABLE} " -m nanobind --cmake_dir
6666 OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT )
67- if (nanobind_ROOT)
67+ if (nanobind_ROOT)
6868 set (nanobind_DIR "${nanobind_ROOT} " CACHE PATH "nanobind CMake package dir" FORCE )
69- if (DEFINED CMAKE_PREFIX_PATH )
69+ if (DEFINED CMAKE_PREFIX_PATH )
7070 list (PREPEND CMAKE_PREFIX_PATH "${nanobind_ROOT} " )
71- else ()
71+ else ()
7272 set (CMAKE_PREFIX_PATH "${nanobind_ROOT} " )
73- endif ()
74- endif ()
73+ endif ()
74+ endif ()
7575find_package (nanobind CONFIG REQUIRED )
7676include_directories (${NB_DIR} /include )
7777message (STATUS "Nanobind DIR: ${NB_DIR} /include" )
@@ -86,9 +86,9 @@ if (NOT fmt_FOUND)
8686 include (FetchContent )
8787 FetchContent_Declare (fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 10.1.0)
8888 FetchContent_MakeAvailable (fmt)
89- else ()
89+ else ()
9090 message (STATUS "Found fmt via Conan/system: ${fmt_DIR} " )
91- endif ()
91+ endif ()
9292
9393
9494# backward-cpp via package or FetchContent (optional)
@@ -106,15 +106,15 @@ if (HGRAPH_WITH_BACKWARD)
106106 set (BACKWARD_HAS_DWARF OFF CACHE BOOL "Disable DWARF" FORCE )
107107 set (BACKWARD_HAS_UNWIND ON CACHE BOOL "Enable libunwind/backtrace if available" FORCE )
108108 FetchContent_MakeAvailable (backward)
109- if (TARGET backward)
109+ if (TARGET backward)
110110 add_library (Backward::Backward ALIAS backward )
111- endif ()
112- else ()
111+ endif ()
112+ else ()
113113 message (STATUS "Found Backward via Conan/system: ${Backward_DIR} " )
114- endif ()
115- else ()
114+ endif ()
115+ else ()
116116 message (STATUS "HGRAPH_WITH_BACKWARD=OFF: Skipping backward-cpp integration" )
117- endif ()
117+ endif ()
118118
119119# Git version info is optional here (no .git necessarily inside this repo)
120120set (GIT_BRANCH "" )
@@ -127,7 +127,7 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
127127 OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE )
128128 execute_process (COMMAND git log -1 --format=%cD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
129129 OUTPUT_VARIABLE GIT_COMMIT_DATE OUTPUT_STRIP_TRAILING_WHITESPACE )
130- endif ()
130+ endif ()
131131
132132message (STATUS "Git current branch: ${GIT_BRANCH} " )
133133message (STATUS "Git commit hash: ${GIT_COMMIT_HASH} " )
0 commit comments