Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localize git submodule stuff to only when BUILD_UWUW #968

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,6 @@ if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
endif()

option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} "submodule" "update" "--init" "--recursive"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL 0)
message(FATAL_ERROR "git submodule update --init --recursive failed with \
${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()

# Check to see if submodules exist (by checking one)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/pyne/pyne/readme.rst")
message(FATAL_ERROR "The git submodules were not downloaded! GIT_SUBMODULE was \
turned off or failed. Please update submodules and try again.")
endif()

# Make the scripts in the "cmake" directory available to CMake
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ v3.2.4
* CMake error message update (#960)
* Updated documentation to build dependencies (#963)
* Pause support for Windows (#966)
* Localize invocation of git submodule for PyNE (#968)

v3.2.3
====================
Expand Down
17 changes: 17 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ if (BUILD_MCNP5 OR BUILD_MCNP6 OR BUILD_GEANT4 OR BUILD_FLUKA OR BUILD_CI_TESTS)
endif ()
if (BUILD_UWUW)
add_subdirectory(uwuw)

if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} "submodule" "update" "--init" "--recursive"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL 0)
message(FATAL_ERROR "git submodule update --init --recursive failed with \
${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()

# Check to see if submodules exist (by checking one)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pyne/pyne/readme.rst")
message(FATAL_ERROR "The git submodules were not downloaded! GIT_SUBMODULE was \
turned off or failed. Please update submodules and try again.")
endif()
add_subdirectory(pyne)
endif ()

Expand Down
Loading