Skip to content

Commit f323618

Browse files
committed
Add using ccache in Linux build if installed
1 parent 5a0d085 commit f323618

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@ cmake_minimum_required(VERSION 2.8.0)
22
project(OpenXRay)
33

44
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
5+
56
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
67

8+
find_program(CCACHE_FOUND ccache)
9+
if(CCACHE_FOUND)
10+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
11+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
12+
endif(CCACHE_FOUND)
13+
714
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17")
15+
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") Это на будущее
16+
#set(CMAKE_CXX_STANDARD 14) #Иначе ублюдочный симак добавляет -std=gnu++11 и ломает сборку
17+
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
18+
#set(CMAKE_CXX_EXTENSIONS OFF)
819

920
add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL)
1021

0 commit comments

Comments
 (0)