-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake")
endif()
set(__COTIRE_INCLUDED TRUE)
-# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode
-# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid
-if (NOT CMAKE_SCRIPT_MODE_FILE)
- cmake_policy(PUSH)
-endif()
-cmake_minimum_required(VERSION 2.8.12)
-if (NOT CMAKE_SCRIPT_MODE_FILE)
- cmake_policy(POP)
-endif()
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
set (COTIRE_CMAKE_MODULE_VERSION "1.7.9")
else ()
message (FATAL_ERROR, "misprint in c++ standard name")
endif()
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
if (APPLE)
set (COMPILER gcc)
elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX)
set (COMPILER gxx)
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
set (COMPILER clang)
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]")
set (COMPILER icc)
else()
set (COMPILER ${CMAKE_GENERATOR})
endif()
install (CODE
- "cmake_policy(PUSH)
- cmake_policy(SET CMP0007 NEW)
- string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
+ "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)
file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\")
foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES})
file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT)
string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\")
file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\")
endforeach()
- endforeach()
- cmake_policy(POP)")
+ endforeach()")
endmacro()
macro (OCCT_INSERT_CODE_FOR_TARGET)
endmacro()
macro (OCCT_UPDATE_DRAW_DEFAULT_FILE)
- install(CODE "cmake_policy(PUSH)
- cmake_policy(SET CMP0007 NEW)
- set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
+ install(CODE "set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\")
file (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT)
file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\")
foreach (line IN LISTS DRAW_DEFAULT_CONTENT)
string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\")
string (REGEX REPLACE \": TK\([a-zA-Z]+\)$\" \": TK\${CMAKE_MATCH_1}${BUILD_SHARED_LIBRARY_NAME_POSTFIX}\" line \"\${line}\")
file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\")
- endforeach()
- cmake_policy(POP)")
+ endforeach()")
endmacro()
macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME)
else() # get CSF_ value
set (CURRENT_CSF ${${USED_ITEM}})
if (NOT "x${CURRENT_CSF}" STREQUAL "x")
- if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs")
+ if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}")
add_definitions (-DHAVE_OPENGL)
endif()
- if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs")
+ if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}")
add_definitions (-DHAVE_GLES2)
endif()
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH})
-set(CMAKE_CXX_STANDARD 11)
set(APP_VERSION_MAJOR 1)
set(APP_VERSION_MINOR 0)
set(APP_TARGET glfwocct)
# system libraries
list(APPEND aLibDeps EGL GLESv2 log android)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD} -Wall -frtti -fexceptions -fpermissive")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -frtti -fexceptions -fpermissive")
add_library(TKJniSample SHARED ${SOURCE_FILES})
target_link_libraries(TKJniSample ${aLibDeps})
-cmake_minimum_required (VERSION 2.6)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (Geometry)
-cmake_minimum_required (VERSION 2.6)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (Modeling)
-cmake_minimum_required (VERSION 2.6)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (ImportExport)
-cmake_minimum_required (VERSION 2.6)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (HLR)
-cmake_minimum_required (VERSION 2.6)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project (mfcsample)
project(occt-webgl-sample)
-set(CMAKE_CXX_STANDARD 11)
set(APP_VERSION_MAJOR 1)
set(APP_VERSION_MINOR 0)
set(APP_TARGET occt-webgl-sample)
-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+# Caution! Be careful, when increase minimal cmake version:
+# using of newer version may leads (by default) to applying
+# of some new policies. It may break compilation.
+# For canceling of applying new policies use:
+# cmake_policy(PUSH) before `cmake_minimum_required`
+# and cmake_policy(POP) after.
+cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
set (ADDITIONAL_INLCUDE_DIR_DESCR "Additional directory to be added in the projects include section")
if (NOT DEFINED ADDITIONAL_INLCUDE_DIR)