commands depend on build type
This commit is contained in:
parent
69dba834cb
commit
c5f1574f47
|
@ -447,19 +447,20 @@ elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||||
# -fdefault-integer-8: Use it to set precision to 8 bytes for integer, don't use it for the standard case of pInt=4 (there is no -fdefault-integer-4)
|
# -fdefault-integer-8: Use it to set precision to 8 bytes for integer, don't use it for the standard case of pInt=4 (there is no -fdefault-integer-4)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (CMAKE_Fortran_FLAGS "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${BUILDCMD_PRE} ${OPENMP_FLAGS} ${STANDARD_CHECK} ${OPTIMIZATION_FLAGS} ${COMPILE_FLAGS} ${PRECISION_FLAGS}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${BUILDCMD_PRE} ${CMAKE_LINKER} ${OPENMP_FLAGS} ${OPTIMIZATION_FLAGS} ${LINKER_FLAGS}")
|
||||||
|
|
||||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
||||||
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DEBUG_FLAGS}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} ${DEBUG_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set (CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}")
|
||||||
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}")
|
set (CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_Fortran_LINK_EXECUTABLE} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${PETSC_EXTERNAL_LIB} ${BUILDCMD_POST}")
|
||||||
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${DAMASK_INCLUDE_FLAGS} ${BUILDCMD_POST}")
|
|
||||||
|
|
||||||
message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS}\n")
|
message ("Fortran Compiler Flags:\n${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}\n")
|
||||||
message ("Fortran Linker Flags:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n")
|
message ("C Compiler Flags:\n${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}\n")
|
||||||
|
message ("Fortran Linker Command:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n")
|
||||||
|
|
||||||
# location of code
|
# location of code
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
|
|
@ -16,8 +16,6 @@ if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
|
||||||
# long lines for interaction matrix
|
# long lines for interaction matrix
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( CMAKE_VERBOSE_MAKEFILE on )
|
|
||||||
|
|
||||||
# The dependency detection in CMake is not functioning for Fortran,
|
# The dependency detection in CMake is not functioning for Fortran,
|
||||||
# hence we declare the dependencies from top to bottom in the following
|
# hence we declare the dependencies from top to bottom in the following
|
||||||
add_library(C_ROUTINES OBJECT "C_routines.c")
|
add_library(C_ROUTINES OBJECT "C_routines.c")
|
||||||
|
|
Loading…
Reference in New Issue