diff --git a/CMakeLists.txt b/CMakeLists.txt index 3df73cbc908..1f2e4eaa119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,20 @@ cmake_minimum_required(VERSION 2.8.0) project(OpenXRay) include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake) + set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +endif(CCACHE_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17") +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") Это на будущее +#set(CMAKE_CXX_STANDARD 14) #Иначе ублюдочный симак добавляет -std=gnu++11 и ломает сборку +#set(CMAKE_CXX_STANDARD_REQUIRED ON) +#set(CMAKE_CXX_EXTENSIONS OFF) add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL)