-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreason.add_executable.help
22 lines (22 loc) · 1.31 KB
/
reason.add_executable.help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
reason_add_executable: reasonable add_executable
params:
- TARGET (STRING): The target name
- FN (STRING): The custom `add_executable` function to use (optional)
- MODE (STRING): The modes you would like to specify reason to build,
currently available: [cuda]
- INC_DIRS (LIST) : Extra include directories (optional)
- SRCS (LIST) : Source files of the library
- LINKS (LIST) : Extra libraries the library should link against (optional)
- DEFINES (LIST) : Extra compile definitions for target
description:
simply wrap 'add_executable', 'target_include_directories', and 'target_link_libraries'
setup rpath, and use cotire if possible
example:
1. Simple, mostly used
reason_add_executable(TARGET demo1 SRCS "src/main.cpp" INC_DIRS "include" LINKS mylib_d)
2. executable with extra compile definitions
reason_add_executable(TARGET demo1 SRCS "src/main.cpp" INC_DIRS "include" DEFINES NDEBUG MY_FLAG=1)
3. Customized 'add_executable' function, i.e. `dummy_add_executable`
reason_add_executable(TARGET demo1 SRCS "src/main.cpp" INC_DIRS "include" LINKS mylib_d FN dummy_add_executable)
4. Use reason to build CUDA project
reason_add_executable(MODE cuda TARGET demo1 SRCS "src/main.cu" INC_DIRS "include" LINKS my_cuda_util_s)