-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (33 loc) · 1.2 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
38
39
40
41
42
cmake_minimum_required(VERSION 3.20)
project(LULESH CXX)
option(WITH_SILO "Build LULESH with silo support" FALSE)
if (WITH_SILO)
find_path(SILO_INCLUDE_DIR silo.h
HINTS ${SILO_DIR}/include)
find_library(SILO_LIBRARY
NAMES siloh5
HINTS ${SILO_DIR}/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SILO DEFAULT_MSG
SILO_LIBRARY
SILO_INCLUDE_DIR)
if (SILO_FOUND)
add_definitions("-DVIZ_MESH")
include_directories(${SILO_INCLUDE_DIR})
# Note: silo needs to be built as a dynamic lib, otherwise
# there are additional dependencies (hdf5) which we don't know.
# This would be fixed by silo providing a CMake package.
list(APPEND LULESH_EXTERNAL_LIBS ${SILO_LIBRARY})
endif()
endif()
find_package(HPX REQUIRED)
find_package(Threads)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=znver1 -mtune=znver1 -mfma -mavx2 -m3dnow -fomit-frame-pointer")
set(LULESH_SOURCES
lulesh-init.cc
lulesh-util.cc
lulesh-viz.cc
lulesh.cc)
set(LULESH_EXEC lulesh-hpx)
add_executable(${LULESH_EXEC} ${LULESH_SOURCES})
target_link_libraries(${LULESH_EXEC} HPX::hpx HPX::wrap_main HPX::iostreams_component ${CMAKE_THREAD_LIBS_INIT})