File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ project(minidb)
6
6
MESSAGE (STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR} )
7
7
MESSAGE (STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR} )
8
8
9
- SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} /bin)
9
+ # Main executables
10
+ SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} /bin/exe)
11
+ # Test executables
12
+ SET (TEST_OUTPUT_PATH ${PROJECT_BINARY_DIR} /bin/test )
13
+
10
14
SET (CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR} /deps/3rd/usr/local;/usr/local;${CMAKE_PREFIX_PATH} " )
11
15
SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} /cmake)
12
16
Original file line number Diff line number Diff line change @@ -27,4 +27,4 @@ TARGET_LINK_LIBRARIES(obclient common pthread dl)
27
27
# Target 必须在定义 ADD_EXECUTABLE 之后, programs 不受这个限制
28
28
# TARGETS和PROGRAMS 的默认权限是OWNER_EXECUTE, GROUP_EXECUTE, 和WORLD_EXECUTE,即755权限, programs 都是处理脚步类
29
29
# 类型分为RUNTIME/LIBRARY/ARCHIVE, prog
30
- INSTALL (TARGETS obclient RUNTIME DESTINATION bin )
30
+ INSTALL (TARGETS obclient RUNTIME DESTINATION ${EXECUTABLE_OUTPUT_PATH} )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ FIND_PACKAGE(jsoncpp CONFIG REQUIRED)
33
33
SET (LIBRARIES common pthread dl libevent::core libevent::pthreads JsonCpp::JsonCpp)
34
34
35
35
# 指定目标文件位置
36
- SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} /bin)
36
+ SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR} /bin/exe )
37
37
MESSAGE ("Binary directory:" ${EXECUTABLE_OUTPUT_PATH} )
38
38
SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR} /lib)
39
39
MESSAGE ("Archive directory:" ${LIBRARY_OUTPUT_PATH} )
@@ -60,5 +60,5 @@ TARGET_LINK_LIBRARIES(observer_static ${LIBRARIES} oblsm)
60
60
# TARGETS和PROGRAMS 的默认权限是OWNER_EXECUTE, GROUP_EXECUTE, 和WORLD_EXECUTE,即755权限, programs 都是处理脚本类
61
61
# 类型分为RUNTIME/LIBRARY/ARCHIVE, prog
62
62
INSTALL (TARGETS observer observer_static
63
- RUNTIME DESTINATION bin
63
+ RUNTIME DESTINATION ${EXECUTABLE_OUTPUT_PATH}
64
64
ARCHIVE DESTINATION lib)
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ find_package(GTest CONFIG REQUIRED)
5
5
6
6
include (GoogleTest)
7
7
8
+ SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_OUTPUT_PATH} )
9
+
8
10
ADD_SUBDIRECTORY (common)
9
11
IF (WITH_MEMTRACER)
10
12
ADD_SUBDIRECTORY (memtracer)
You can’t perform that action at this time.
0 commit comments