-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·45 lines (36 loc) · 1.03 KB
/
CMakeLists.txt
File metadata and controls
executable file
·45 lines (36 loc) · 1.03 KB
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
38
39
40
41
42
43
44
45
# Eigen library.
find_package(Eigen3 REQUIRED)
# Set include directories.
include_directories(
../../extern
../../discregrid/include
${EIGEN3_INCLUDE_DIR}
)
if(WIN32)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(WIN32)
if ( CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar")
endif ( CMAKE_COMPILER_IS_GNUCC )
# OpenMP support.
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
if (CMAKE_VERSION VERSION_GREATER "3.8")
link_libraries(OpenMP::OpenMP_CXX)
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
endif()
add_executable(DiscreteFieldToBitmap
main.cpp
)
add_dependencies(DiscreteFieldToBitmap
Discregrid
)
target_link_libraries(DiscreteFieldToBitmap
Discregrid
)
set_target_properties(DiscreteFieldToBitmap PROPERTIES FOLDER Cmd)