forked from cpgf/cpgf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.global.txt
46 lines (33 loc) · 2.11 KB
/
build.global.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
set(ROOT_PATH ${PROJECT_SOURCE_DIR})
set(BIN_PATH ${PROJECT_SOURCE_DIR}/bin)
set(INCLUDE_PATH ${ROOT_PATH}/include)
set(LIB_PATH ${ROOT_PATH}/lib)
set(SRC_PATH ${ROOT_PATH}/src)
set(TEST_PATH ${ROOT_PATH}/test)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_PATH})
if(GCC_LIKE)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${GCC_OPTIMIZED_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${GCC_DEBUG_COMPILE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${GCC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${GCC_DEBUG_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${GCC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${GCC_DEBUG_LINK_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} ${GCC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS_DEBUG} ${GCC_DEBUG_LINK_FLAGS}")
endif()
if(MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_OPTIMIZED_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_DEBUG_COMPILE_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${MSVC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${MSVC_DEBUG_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${MSVC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${MSVC_DEBUG_LINK_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} ${MSVC_OPTIMIZED_LINK_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS_DEBUG} ${MSVC_DEBUG_LINK_FLAGS}")
endif()
if(MSVC)
# add_definitions(-D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0)
if(CMAKE_GENERATOR STREQUAL "NMake Makefiles")
set(LIB_PATH ${ROOT_PATH}/lib/${CMAKE_CFG_INTDIR})
endif(CMAKE_GENERATOR STREQUAL "NMake Makefiles")
endif(MSVC)