forked from michelebucelli/nmpde-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (32 loc) · 1.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.12.0)
project(project_nmpde LANGUAGES CXX C)
include(common/cmake-common.cmake)
include_directories(
src
)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
#add_definitions (-D CHECK_ACTIVATION_TIMES)
if(CHECK_ACTIVATION_TIMES STREQUAL "ON")
message(STATUS "Compiling with activation times support")
add_definitions (-D CHECK_ACTIVATION_TIMES)
# Add logic here based on the value of MY_VARIABLE
endif()
add_executable(nmpde src/main.cpp
src/MonodomainSolver/FESolver.cpp )
deal_ii_setup_target(nmpde)
# Define the custom command with shell evaluation
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/mesh_generated
COMMAND ${CMAKE_COMMAND} -E env sh -c "mkdir -p ../meshes && gmsh mesh_nmpde.geo -parse_and_exit -setnumber lc \$MESH_STEP"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts
COMMENT "Generating the mesh with gmsh"
VERBATIM
)
# Define the custom target
add_custom_target(
GenerateMesh
DEPENDS ${CMAKE_BINARY_DIR}/mesh_generated
)