now it is possible to call cmake from make
This commit is contained in:
parent
35ab12e8f9
commit
c6d8d42b4d
|
@ -120,6 +120,10 @@ option(OPTIMIZATION "DAMASK optimization level [OFF,DEFENSIVE,AGGRESSIVE]"
|
|||
option(SPECTRAL "Build spectral sovler for DAMASAK" OFF )
|
||||
option(FEM "Build FEM solver for DAMASK" OFF )
|
||||
|
||||
if (NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif(NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
|
||||
# COMPILE VARIABLES
|
||||
add_definitions(-DDAMASKVERSION="${DAMASK_V}")
|
||||
add_definitions(-DPETSc)
|
||||
|
@ -139,10 +143,12 @@ if ("${DAMASK_DRIVER}" STREQUAL "SPECTRAL")
|
|||
set (SPECTRAL ON )
|
||||
add_definitions(-DSpectral)
|
||||
set (FEM OFF)
|
||||
message("***Confiugring Spectral Solver")
|
||||
elseif ("${DAMASK_DRIVER}" STREQUAL "FEM")
|
||||
set (FEM ON )
|
||||
add_definitions(-DFEM)
|
||||
set (SPECTRAL OFF)
|
||||
message("***Confiugring FEM Solver")
|
||||
endif("${DAMASK_DRIVER}" STREQUAL "SPECTRAL")
|
||||
|
||||
set (DAMASK_INCLUDE_FLAGS "${DAMASK_INCLUDE_FLAGS} ${PETSC_INCLUDES}" )
|
||||
|
@ -473,7 +479,7 @@ else(DEFINED BUILDCMD_PRE AND DEFINED BUILDCMD_POST)
|
|||
endif(DEFINED BUILDCMD_PRE AND DEFINED BUILDCMD_POST)
|
||||
|
||||
message("***COMPILE FLAGS:\n${CMAKE_Fortran_FLAGS_RELEASE}\n")
|
||||
message("***LINK FLAGS:\n${CMAKE_EXE_LINKER_FLAGS_RELEASE}\n")
|
||||
message("***LINKER:\n${CMAKE_Fortran_LINK_EXECUTABLE}\n")
|
||||
|
||||
# MOVE to SOURCE DIRECTORY for BUILDING
|
||||
add_subdirectory(src)
|
||||
|
|
37
Makefile
37
Makefile
|
@ -5,44 +5,25 @@ SHELL = /bin/sh
|
|||
.PHONY: all
|
||||
all: spectral FEM
|
||||
|
||||
|
||||
spectral: build/spectral
|
||||
@(cd build/spectral; )
|
||||
|
||||
@(cd build/spectral; make; make install;)
|
||||
|
||||
build/spectral: build
|
||||
@mkdir build/spectral
|
||||
@(cd build/spectral; cmake -Wno-dev -DCMAKE_VERBOSE_MAKEFILE=OFF -DOPENMP=ON -DOPTIMIZATION=DEFENSIVE -DDAMASK_DRIVER=SPECTRAL ../..;)
|
||||
@(cd build/spectral; cmake -Wno-dev -DCMAKE_BUILD_TYPE=RELEASE -DDAMASK_DRIVER=SPECTRAL ../..;)
|
||||
|
||||
|
||||
build:
|
||||
build: bin
|
||||
@mkdir build
|
||||
|
||||
bin:
|
||||
@mkdir bin
|
||||
|
||||
.PHONY: FEM
|
||||
FEM:
|
||||
$(MAKE) DAMASK_FEM.exe -C src
|
||||
FEM: build/FEM
|
||||
@(cd build/FEM; cmake -Wno-dev -DCMAKE_BUILD_TYPE=RELEASE -DDAMASK_DRIVER=FEM ../..;)
|
||||
|
||||
.PHONY: marc
|
||||
marc:
|
||||
@./installation/mods_MarcMentat/apply_DAMASK_modifications.sh ${MAKEFLAGS}
|
||||
|
||||
.PHONY: processing
|
||||
processing:
|
||||
@if hash cython 2>/dev/null; then \
|
||||
cd ./lib/damask; \
|
||||
CC=gcc python setup_corientation.py build_ext --inplace; \
|
||||
rm -rv build; \
|
||||
rm *.c; \
|
||||
fi
|
||||
@./installation/compile_CoreModule.py ${MAKEFLAGS}
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
@$(MAKE) tidy -C src >/dev/null
|
||||
build/FEM: build
|
||||
@mkdir build
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
|
||||
clean:
|
||||
rm -rvf build
|
||||
|
|
Loading…
Reference in New Issue