Skip to content

Commit faa9cb1

Browse files
committed
Avoid warnings due to policies
1 parent ad2bd9f commit faa9cb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ project(cmaple)
7373
add_definitions(-DCMAPLE)
7474
set(CMAKE_CXX_STANDARD 20)
7575

76+
# Add policy to avoid warnings
77+
cmake_policy(SET CMP0069 NEW)
78+
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
79+
if(POLICY CMP0135)
80+
cmake_policy(SET CMP0135 NEW)
81+
set(CMAKE_POLICY_DEFAULT_CMP0135 NEW)
82+
endif()
83+
7684
if (((${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch") AND (NOT APPLE AND UNIX))
7785
OR WIN32)
7886
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE) # Disable IPO (LTO) for Linux ARM

0 commit comments

Comments
 (0)