CMake build system functions properly for spectral solver
This commit is contained in:
parent
57c8213d9b
commit
9cb9de9c8a
|
@ -387,7 +387,7 @@ if (Fortran_COMPILER_NAME MATCHES "ifort.*")
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${LINK_OPTIONS_ifort}" )
|
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${LINK_OPTIONS_ifort}" )
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPTIMIZATION_ifort}" )
|
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPTIMIZATION_ifort}" )
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${STANDARD_CHECK_ifort}")
|
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${STANDARD_CHECK_ifort}")
|
||||||
#set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PETSC_EXTERNAL_LIB}" )
|
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${PETSC_EXTERNAL_LIB}" )
|
||||||
|
|
||||||
# for DEBUG
|
# for DEBUG
|
||||||
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${CMAKE_Fortran_FLAGS_RELEASE}")
|
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${CMAKE_Fortran_FLAGS_RELEASE}")
|
||||||
|
@ -427,15 +427,16 @@ set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${DAMASK_I
|
||||||
set (CMAKE_LINKER "${PETSC_LINKER}")
|
set (CMAKE_LINKER "${PETSC_LINKER}")
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
if (CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE
|
set (CMAKE_Fortran_LINK_EXECUTABLE
|
||||||
"${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS_RELEASE} -o <TARGET> ${DAMASK_EXE} ${PETSC_EXTERNAL_LIB}")
|
"${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS_RELEASE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB}")
|
||||||
else(CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
else(CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE
|
set (CMAKE_Fortran_LINK_EXECUTABLE
|
||||||
"${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS_DEBUG} <OBJECTS> -o <TARGET> ${PETSC_EXTERNAL_LIB}")
|
"${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS_DEBUG} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB}")
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
endif(CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
||||||
|
|
||||||
message("***COMPILE FLAGS:\n${CMAKE_Fortran_FLAGS_RELEASE}\n")
|
message("***COMPILE FLAGS:\n${CMAKE_Fortran_FLAGS_RELEASE}\n")
|
||||||
message("***LINK FLAGS:\n${CMAKE_EXE_LINKER_FLAGS_RELEASE}\n")
|
message("***LINK FLAGS:\n${CMAKE_EXE_LINKER_FLAGS_RELEASE}\n")
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# ADD CODE DIRECTORY
|
# ADD CODE DIRECTORY
|
||||||
add_subdirectory(code)
|
add_subdirectory(code)
|
||||||
|
|
Loading…
Reference in New Issue