Skip to content

Commit 3f1ac11

Browse files
committed
test
1 parent 27d6dcb commit 3f1ac11

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
cmake_minimum_required(VERSION 3.26)
22

3-
if(POLICY CMP0025)
4-
cmake_policy(SET CMP0025 NEW)
5-
endif()
6-
73
include(cmake/PreventInSourceBuilds.cmake)
84

95
project(

cmake/CompilerWarnings.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function(set_compiler_warnings target)
5757
/Zc:throwingNew
5858
/EHsc)
5959
endif()
60-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
60+
elseif (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
6161
set(PROJECT_WARNINGS
6262
-fstack-protector-strong
6363
-Wall
@@ -112,6 +112,5 @@ function(set_compiler_warnings target)
112112
message(AUTHOR_WARNING "No compiler warnings set for CXX compiler: '${CMAKE_CXX_COMPILER_ID}'")
113113
endif()
114114

115-
message(STATUS "Detected CXX Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
116115
target_compile_options(${target} PRIVATE ${PROJECT_WARNINGS})
117116
endfunction()

cmake/LinkerFlags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function(set_linker_flags target)
22
if (MSVC)
33
set(PROJECT_LINK_OPTIONS /machine:x64 /guard:cf)
4-
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
4+
elseif (NOT APPLE AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
55
set(PROJECT_LINK_OPTIONS -Wl,--allow-shlib-undefined,--as-needed,-z,noexecstack,-z,relro,-z,now,-z,nodlopen)
66
endif()
77

0 commit comments

Comments
 (0)