forked from flexi-framework/hopr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·388 lines (344 loc) · 16.4 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# =========================================================================
# HOPR CMake configuration
# =========================================================================
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
cmake_policy (SET CMP0045 OLD)
cmake_policy (SET CMP0046 OLD)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
INCLUDE(ExternalProject)
INCLUDE(CMakeDependentOption)
# =========================================================================
# Check whether we are on Github or at IAG
# =========================================================================
EXECUTE_PROCESS(COMMAND git ls-remote --get-url OUTPUT_VARIABLE GIT_ORIGIN)
STRING(FIND "${GIT_ORIGIN}" ".iag.uni-stuttgart.de" HOMERUN)
STRING(FIND "${GIT_ORIGIN}" "git@" USESSH)
IF (HOMERUN GREATER -1)
IF(USESSH EQUAL 0)
SET(HOPR_DLPATH "[email protected]:libs")
ELSE()
SET(HOPR_DLPATH "https://gitlabext.iag.uni-stuttgart.de/libs")
ENDIF()
SET(CGNSDOWNLOAD ${HOPR_DLPATH}/CGNS.git )
SET(HDF5DOWNLOAD ${HOPR_DLPATH}/hdf5.git )
ELSE()
SET(CGNSDOWNLOAD https://github.com/CGNS/CGNS.git )
SET(HDF5DOWNLOAD https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git )
ENDIF()
SET(HOPR_HDF5TAG "hdf5-1_10_0-patch1" CACHE STRING "HDF5 version tag")
SET(HOPR_CGNSTAG "v3.3.0" CACHE STRING "CGNS version tag")
# =========================================================================
# Detect machine environements
# =========================================================================
SITE_NAME(CMAKE_HOSTNAME)
STRING(FIND "${CMAKE_HOSTNAME}" "eslogin" ONHORNET)
# Set options that need to be enabled BEFORE ANY PROJECT OR LANGUAGE COMMAND
IF (ONHORNET GREATER -1)
SET(CMAKE_C_COMPILER cc)
SET(CMAKE_CXX_COMPILER CC)
SET(CMAKE_Fortran_COMPILER ftn)
SET(HDF5_USE_STATIC_LIBRARIES TRUE)
MARK_AS_ADVANCED(C_PATH CXX_PATH Fortran_PATH)
MESSAGE(STATUS "Compiling on Hazelhen")
ADD_DEFINITIONS(-DLUSTRE)
ENDIF()
# =========================================================================
# Project definitions and output paths
# =========================================================================
PROJECT(Hopr)
ENABLE_LANGUAGE(C Fortran)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
# Set custom install dir (needs to be done after project has been defined!)
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH "Prefix prepended to install directories" FORCE)
ENDIF()
# =========================================================================
# Options
# =========================================================================
MACRO(SUBDIRLIST result curdir)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
SET(dirlist "")
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child})
LIST(APPEND dirlist ${child})
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
ENDMACRO()
OPTION(HOPR_MPI "Compile SINGLE or MPI version" ON)
OPTION(HOPR_BUILD_YPLUSESTIMATOR "Compile and build Y+-Estimator" OFF)
OPTION(HOPR_BUILD_HDF5 "Compile and build hdf5 library" ON)
OPTION(HOPR_BUILD_CGNS "Compile and build CGNS library" ON)
SET(HOPR_CGNS_INT "32" CACHE STRING "integer type in CGNS lib")
# =========================================================================
# USERBLOCK + Preproc_flags
# =========================================================================
# A function to get all user defined variables with a specified prefix
function (getListOfVarsStartingWith _prefix _varResult)
GET_CMAKE_PROPERTY(_vars CACHE_VARIABLES)
STRING(REGEX MATCHALL "(^|;)${_prefix}[A-Za-z0-9_]*" _matchedVars "${_vars}")
SET(${_varResult} ${_matchedVars} PARENT_SCOPE)
endfunction()
# A function to get all user defined variables with a specified prefix
SET(configuration ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/configuration.cmake)
FILE(WRITE ${configuration} "")
GETLISTOFVARSSTARTINGWITH("HOPR_" hoprVars)
FOREACH (_var IN LISTS hoprVars)
GET_PROPERTY(currentHelpString CACHE "${_var}" PROPERTY HELPSTRING)
SET(boolian (${${_var}} STREQUAL "ON" OR ${${_var}} STREQUAL "OFF"))
IF(${boolian})
FILE(APPEND ${configuration} "OPTION(${_var} \"${currentHelpString}\" ${${_var}})\n")
ELSE()
IF(${_var})
STRING(REPLACE "\\" "\\\\" ${_var} ${${_var}})
ENDIF()
FILE(APPEND ${configuration} "SET(${_var} \"${${_var}}\" CACHE STRING \"${currentHelpString}\")\n")
ENDIF()
ENDFOREACH()
# =========================================================================
# Build type
# =========================================================================
# make sure that the default is a RELEASE
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: Debug Release Profile."
FORCE)
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release Profile)
ENDIF (NOT CMAKE_BUILD_TYPE)
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
ADD_DEFINITIONS("-DDEBUG")
ENDIF()
# =========================================================================
# Location of binary and filenames
# =========================================================================
# append relative filename-macro for __FILENAME__ in Stamp of abort function (see hopr.h)
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
# add basedir for location of corresponding userblock-file
ADD_DEFINITIONS("-DBASEDIR='\"${CMAKE_CURRENT_BINARY_DIR}/\"'")
# =========================================================================
# COMPILER FLAGS
# =========================================================================
# FFLAGS depend on the compiler
GET_FILENAME_COMPONENT (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
IF (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
# set Flags
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8 -fbackslash -ffree-line-length-0 -DGNU")
SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O3 -march=native -finline-functions")
SET (CMAKE_Fortran_FLAGS_PROFILE "${CMAKE_Fortran_FLAGS} -pg -O3 -march=native -finline-functions")
SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -g -O0 -ggdb3 -fbounds-check -finit-real=nan -fbacktrace -Wall")
# add flags only for compiling not linking!
SET (HOPR_COMPILE_FLAGS "-xf95-cpp-input")
ELSEIF (CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
# set Flags
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -i4 -traceback -warn all -shared-intel -DINTEL")
SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O2 -xHost -qopt-report0 -qopt-report-phase=vec")
SET (CMAKE_Fortran_FLAGS_PROFILE "${CMAKE_Fortran_FLAGS} -p -O2 xHost -qopt-report0 -qopt-report-phase=vec")
SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -g -O0 -fpe0 -traceback -check all,noarg_temp_created,noformat,nooutput_conversion,pointer,uninit")
SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O2 -xHost -ip")
SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -p -O2 -xHost -ip")
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g")
# add flags only for compiling not linking!
SET (HOPR_COMPILE_FLAGS "-fpp -assume bscc")
ELSE()
MESSAGE(ERROR "Unknown compiler")
ENDIF()
# =========================================================================
# Add the libraries
# =========================================================================
IF(HOPR_MPI)
SET(HOPR_EXTERNAL_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/share/${CMAKE_Fortran_COMPILER_ID}-MPI)
ELSE()
SET(HOPR_EXTERNAL_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/share/${CMAKE_Fortran_COMPILER_ID})
ENDIF()
MARK_AS_ADVANCED(HOPR_EXTERNAL_LIB_DIR)
# =========================================================================
# HDF5 library
# =========================================================================
IF(NOT HOPR_BUILD_HDF5)
#FIND_PACKAGE(HDF5 NAMES hdf5 COMPONENTS C Fortran QUIET) #if built with configure script
FIND_PACKAGE(HDF5 NAMES hdf5 COMPONENTS C Fortran static NO_MODULE QUIET PATH_SUFFIXES share/cmake )
IF (HDF5_FOUND)
SET(HOPR_HDF5_CMAKE TRUE)
ELSE()
FIND_PACKAGE(HDF5 COMPONENTS C Fortran QUIET )
IF (HDF5_FOUND)
SET(HOPR_HDF5_CMAKE FALSE)
MESSAGE (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}")
MESSAGE (STATUS "HDF5 Fortran libs: static:${HDF5_static_Fortran_FOUND} and shared:${HDF5_shared_Fortran_FOUND}")
ENDIF()
ENDIF()
ELSE()
# define here the path to download from
SET(HOPR_HDF5_DLDIR ${HOPR_EXTERNAL_LIB_DIR}/HDF5)
SET(HOPR_HDF5_DIR ${HOPR_HDF5_DLDIR}/build)
IF (NOT EXISTS "${HOPR_HDF5_DIR}/lib/libhdf5.a")
IF(HOPR_MPI)
SET(HOPR_HDF5PARALLEL --enable-parallel)
SET(HOPR_HDF5FC ${MPI_Fortran_COMPILER})
SET(HOPR_HDF5CC ${MPI_C_COMPILER})
ELSE()
UNSET(HOPR_HDF5PARALLEL)
SET(HOPR_HDF5FC ${CMAKE_Fortran_COMPILER})
SET(HOPR_HDF5CC ${CMAKE_C_COMPILER} )
ENDIF()
#NOTE: old 1.8.X versions of HDF5 require additional flag --enable-fortran2003
ExternalProject_Add(HDF5
GIT_REPOSITORY ${HDF5DOWNLOAD}
GIT_TAG ${HOPR_HDF5TAG}
PREFIX ${HOPR_HDF5_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND FC=${HOPR_HDF5FC} CC=${HOPR_HDF5CC} ${HOPR_HDF5_DIR}/src/HDF5/configure --prefix=${HOPR_HDF5_DIR} --enable-fortran ${HOPR_HDF5PARALLEL} --disable-shared --libdir=${HOPR_HDF5_DIR}/lib
BUILD_COMMAND ${MAKE}
)
# CMake HDF5 is fast but not that reliable
# ExternalProject_Add(HDF5
# GIT_REPOSITORY ${HDF5DOWNLOAD}
# GIT_TAG ${HDF5TAG}
# PREFIX ${HOPR_HDF5_DIR}
# UPDATE_COMMAND ""
# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${HOPR_HDF5_DIR} -DCMAKE_C_COMPILER=${HOPR_HDF5CC} -DCMAKE_Fortran_COMPILER=${HOPR_HDF5FC} -DBUILD-TESTING=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_FORTRAN=ON -DHDF5_ENABLE_PARALLEL=ON
# BUILD_COMMAND ${MAKE}
# )
ENDIF()
SET(HDF5_hdf5_LIBRARY_RELEASE ${HOPR_HDF5_DIR}/lib/libhdf5.a)
SET(HDF5_hdf5_fortran_LIBRARY_RELEASE ${HOPR_HDF5_DIR}/lib/libhdf5_fortran.a)
SET(HDF5_C_INCLUDE_DIR ${HOPR_HDF5_DIR}/include)
SET(HDF5_Fortran_INCLUDE_DIR ${HOPR_HDF5_DIR}/include)
UNSET(HDF5_LIBRARIES)
UNSET(HDF5_INCLUDE_DIR_FORTRAN)
UNSET(HDF5_INCLUDE_DIR)
LIST(APPEND HDF5_INCLUDE_DIR_FORTRAN ${HDF5_Fortran_INCLUDE_DIR} ${HDF5_C_INCLUDE_DIR})
LIST(APPEND HDF5_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
FIND_LIBRARY(HDF5_z_LIBRARY_RELEASE z)
LIST(APPEND HDF5_LIBRARIES ${HDF5_hdf5_fortran_LIBRARY_RELEASE} ${HDF5_hdf5_LIBRARY_RELEASE} ${HDF5_z_LIBRARY_RELEASE} -ldl)
ENDIF()
IF(HOPR_HDF5_CMAKE)
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR_FORTRAN} ${HDF5_INCLUDE_DIR})
LIST(APPEND linkedlibs ${HDF5_FORTRAN_STATIC_LIBRARY} ${HDF5_LIBRARIES})
ELSE()
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR_FORTRAN} ${HDF5_INCLUDE_DIR})
MESSAGE(STATUS "Found HDF5 Libs: " ${HDF5_LIBRARIES})
LIST(APPEND linkedlibs ${HDF5_FORTRAN_STATIC_LIBRARY} ${HDF5_LIBRARIES})
ENDIF()
# =========================================================================
# LAPACK/MKL library
# =========================================================================
# use Lapack/Blas for GNU
MESSAGE(STATUS "Using BLAS/Lapack library")
IF (HOPR_MKL)
SET(BLA_VENDOR "Intel") #search only for Intel BLAS (=MKL)
ENDIF()
FIND_PACKAGE(LAPACK QUIET)
IF (LAPACK_FOUND)
LIST(APPEND linkedlibs ${LAPACK_LIBRARIES})
ENDIF()
# =========================================================================
# MPI
# =========================================================================
IF(HOPR_MPI)
FIND_PACKAGE(MPI REQUIRED)
IF (NOT MPI_Fortran_NO_INTERROGATE)
FOREACH(DIR ${MPI_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${DIR})
ENDFOREACH()
FOREACH(DIR ${MPI_Fortran_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${DIR})
ENDFOREACH()
LIST(APPEND linkedlibs ${MPI_Fortran_LIBRARIES})
ENDIF()
MARK_AS_ADVANCED(MPI_LIBRARY MPI_EXTRA_LIBRARY) # don't show these ones
ADD_DEFINITIONS(-DMPI)
MESSAGE(STATUS "Building HOPR with MPI")
MESSAGE(STATUS "MPI Compiler: " ${MPI_Fortran_COMPILER})
ENDIF()
# =========================================================================
# CGNS library
# =========================================================================
ADD_DEFINITIONS(-DPP_CGNS_INT=${HOPR_CGNS_INT})
IF (HOPR_BUILD_CGNS)
SET(HOPR_CGNS_DLDIR ${HOPR_EXTERNAL_LIB_DIR}/CGNS)
SET(HOPR_CGNS_DIR ${HOPR_CGNS_DLDIR}/build)
IF (NOT EXISTS "${HOPR_CGNS_DIR}/lib/libcgns.a")
STRING(COMPARE EQUAL ${HOPR_CGNS_INT} "64" HOPR_CGNS_64BIT)
ExternalProject_Add(cgns
GIT_REPOSITORY ${CGNSDOWNLOAD}
GIT_TAG ${HOPR_CGNSTAG}
#PATCH_COMMAND sed -i s/^c/!/g ${HOPR_CGNS_DIR}/src/cgns/src/cgnslib_f.h.in
PREFIX ${HOPR_CGNS_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${HOPR_CGNS_DIR}/build /
-DCGNS_ENABLE_FORTRAN=ON -DCGNS_ENABLE_64BIT=${HOPR_CGNS_64BIT} -DCGNS_BUILD_SHARED=OFF -DCGNS_USE_SHARED=OFF /
-DCMAKE_BUILD_TYPE=Release -DCGNS_BUILD_CGNSTOOLS=OFF -DCGNS_ENABLE_HDF5=OFF -DCGNS_ENABLE_PARALLEL=OFF -DCGNS_ENABLE_TESTS=OFF -DCMAKE_SKIP_RPATH=ON
)
ENDIF()
LIST(APPEND linkedlibs ${HOPR_CGNS_DIR}/build/lib/libcgns.a)
INCLUDE_DIRECTORIES(${HOPR_CGNS_DIR}/build/include)
ELSE()
FIND_PACKAGE(CGNS)
IF (CGNS_FOUND)
MESSAGE(STATUS "CGNS include dir: " ${CGNS_INCLUDE_DIR})
LIST(APPEND linkedlibs ${CGNS_LIBRARIES})
INCLUDE_DIRECTORIES (${CGNS_INCLUDE_DIR})
ELSE()
MESSAGE(ERROR "CGNS not found")
ENDIF()
ENDIF()
# =========================================================================
# HOPR sources & targets
# =========================================================================
function(add_exec target)
ADD_EXECUTABLE(${target} ${ARGN})
TARGET_LINK_LIBRARIES(${target} hoprlib ${linkedlibs})
SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS ${HOPR_COMPILE_FLAGS})
SET_TARGET_PROPERTIES(${target} PROPERTIES LINKER_LANGUAGE Fortran)
INSTALL(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target} DESTINATION bin)
STRING(TOUPPER ${target} TARGETUP)
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "SUCCESS: ${TARGETUP} BUILD COMPLETE!")
endfunction()
# include hopr.h
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src)
# collect all F90 files needed for hoprlib
FILE(GLOB_RECURSE hoprF90 ./src/basis/*.f90
./src/mesh/*.f90
./src/output/*.f90
./src/readin/*.f90
./src/search/*.f90
./src/sfc/*.f90
globals.f90
headers.f90
io_hdf5.f90
sortingtools.f90)
FILE(GLOB_RECURSE hoprC ./src/sfc/*.c)
# define libs
ADD_LIBRARY(hoprlibF90 OBJECT ${hoprF90})
SET_TARGET_PROPERTIES(hoprlibF90 PROPERTIES COMPILE_FLAGS ${HOPR_COMPILE_FLAGS})
ADD_LIBRARY(hoprlibC OBJECT ${hoprC})
SET_TARGET_PROPERTIES(hoprlibC PROPERTIES LINKER_LANGUAGE C)
ADD_LIBRARY(hoprlib STATIC $<TARGET_OBJECTS:hoprlibF90> $<TARGET_OBJECTS:hoprlibC>)
ADD_DEPENDENCIES(hoprlibF90 HDF5 cgns)
add_exec(hopr ./src/hopr.f90)
ADD_DEPENDENCIES(hopr hoprlib HDF5 cgns)
# =========================================================================
# Y+-Estimator Tool
# =========================================================================
IF (HOPR_BUILD_YPLUSESTIMATOR)
add_exec(yplusestimator ./tools/yplusestimator/yplusestimator.f90)
ENDIF()
# =========================================================================
# Ctags
# =========================================================================
ADD_CUSTOM_COMMAND(OUTPUT ctags.txt COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && ctags -R -f ctags.txt src)
ADD_CUSTOM_TARGET(tags DEPENDS ctags.txt)
FIND_PROGRAM(CTAGS_PATH ctags)
IF(CTAGS_PATH)
MESSAGE(STATUS "Found ctags: ${CTAGS_PATH}")
ADD_DEPENDENCIES(hopr tags)
ENDIF(CTAGS_PATH)
# =========================================================================
# generate .hopr in $HOME
# =========================================================================
ADD_CUSTOM_COMMAND(TARGET hopr POST_BUILD COMMAND echo \"export HOPR_DIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}\" > $ENV{HOME}/.hopr)
ADD_CUSTOM_COMMAND(TARGET hopr POST_BUILD COMMAND echo \"alias hopr='${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/hopr'\" >> $ENV{HOME}/.hopr)