Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Updated more of the build scripts to get debug mode working
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Feb 13, 2024
1 parent 1760b11 commit ceba718
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 33 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ ELSE()
SET(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
SET(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
ENDIF ()
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Have the .mod files placed in the include folder
SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
Expand Down
2 changes: 1 addition & 1 deletion SHTOOLS
Submodule SHTOOLS updated from f50f58 to 8b74bb
4 changes: 2 additions & 2 deletions buildscripts/build_negishi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module load netcdf-fortran/intel-oneapi/4.6.1
module load shtools/intel-oneapi/4.11.10
cmake -P distclean.cmake
pip install --config-settings=editable.rebuild=true \
--config-settings=build-dir="build/{wheel_tag}" \
--config-settings=build-dir="build" \
--config-settings=cmake.build-type="${BUILD_TYPE}" \
--config-settings=cmake.args="-DUSE_SIMD=ON" \
--config-settings=cmake.args="-DUSE_OPENMP=ON" \
Expand All @@ -31,4 +31,4 @@ pip install --config-settings=editable.rebuild=true \
-ve .


LD_LIBRARY_PATH=$(realpath ${ROOT_DIR}/build/*/bin):$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$(realpath ${ROOT_DIR}/build/bin):$LD_LIBRARY_PATH
30 changes: 0 additions & 30 deletions buildscripts/install_editable_debug.sh

This file was deleted.

6 changes: 6 additions & 0 deletions cmake/Modules/SetSwiftestFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ IF (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "TESTING" )
Fortran "/Qopt-prefetch-" # Intel Windows
)
ELSE ()
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG}"
Fortran REQUIRED "-pg -g3"
)
SET_COMPILE_FLAG(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
C REQUIRED "-g3"
)
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG}"
Fortran REQUIRED "-O0" # All compilers not on Windows
)
Expand Down

0 comments on commit ceba718

Please sign in to comment.