-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Identical file names in multiple directories were causing file overwrites during parallel CMake build. Fixed this by splitting the build into two subdirectories.
- Loading branch information
Showing
3 changed files
with
32 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
# Define the mesher executable | ||
FILE(GLOB MESHER_SRCS "${AXISEM_SOURCE_DIR}/MESHER/*.f90" "${AXISEM_SOURCE_DIR}/MESHER/*.F90") | ||
ADD_EXECUTABLE(xmesh ${MESHER_SRCS}) | ||
|
||
# Set compile/link flags for the mesher | ||
SET(MESHER_COMPILER_FLAGS "${MESHER_COMPILER_FLAGS} ${OpenMP_Fortran_FLAGS}") | ||
IF(NETCDF_FOUND) | ||
SET(MESHER_COMPILER_FLAGS "${MESHER_COMPILER_FLAGS} -Dunc") | ||
TARGET_LINK_LIBRARIES(xmesh ${NETCDF_LIBRARIES}) | ||
ENDIF(NETCDF_FOUND) | ||
SET_TARGET_PROPERTIES(xmesh PROPERTIES LINK_FLAGS ${OpenMP_Fortran_FLAGS}) | ||
SET_TARGET_PROPERTIES(xmesh PROPERTIES COMPILE_FLAGS ${MESHER_COMPILER_FLAGS}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Define the axisem executable | ||
FILE(GLOB SOLVER_SRCS "${AXISEM_SOURCE_DIR}/SOLVER/*.f90" "${AXISEM_SOURCE_DIR}/SOLVER/*.F90" "${AXISEM_SOURCE_DIR}/SOLVER/*.c") | ||
ADD_EXECUTABLE(axisem ${SOLVER_SRCS}) | ||
|
||
# Set compile/link flags for axisem | ||
SET(SOLVER_COMPILER_FLAGS "${SOLVER_COMPILER_FLAGS} -Dsolver") | ||
SET(SOLVER_COMPILER_FLAGS "${SOLVER_COMPILER_FLAGS} ${OpenMP_Fortran_FLAGS}") | ||
IF(NOT MPI_Fortran_FOUND) | ||
SET(SOLVER_COMPILER_FLAGS "${SOLVER_COMPILER_FLAGS} -Dserial") | ||
ENDIF(NOT MPI_Fortran_FOUND) | ||
TARGET_LINK_LIBRARIES(axisem ${MPI_Fortran_LIBRARIES}) | ||
IF(NETCDF_FOUND) | ||
SET(SOLVER_COMPILER_FLAGS "${SOLVER_COMPILER_FLAGS} -Dunc") | ||
TARGET_LINK_LIBRARIES(axisem ${NETCDF_LIBRARIES}) | ||
ENDIF(NETCDF_FOUND) | ||
SET_TARGET_PROPERTIES(axisem PROPERTIES COMPILE_FLAGS ${SOLVER_COMPILER_FLAGS}) | ||
SET_TARGET_PROPERTIES(axisem PROPERTIES LINK_FLAGS ${OpenMP_Fortran_FLAGS}) | ||
|
e9f73ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the top-level
CMakeLists.txt
still exist though?e9f73ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it got removed somehow but it's back in with the next commit.
e9f73ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, it's annoying GitHub shows parents, but not children in the diff view here. But I see it now, and it seems to work, too.