summaryrefslogtreecommitdiffstats
path: root/CompileFlags.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 02:18:13 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:48 (GMT)
commit83491ddd43fb4733940c92e9d7d7647f66f49bbe (patch)
tree8f7ef01b2cd622e90b4d6824b3bb0b4a609781bd /CompileFlags.cmake
parent1bcacccce9e60800ea826c7e79012a64fec4e687 (diff)
downloadCMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.zip
CMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.tar.gz
CMake-83491ddd43fb4733940c92e9d7d7647f66f49bbe.tar.bz2
Build: `add_definitions()` → `add_compile_definitions()`
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r--CompileFlags.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index acfa29f..bf8a082 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -18,7 +18,7 @@ endif()
# not hurt other versions, and this will work into the
# future
if(MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS)
- add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+ add_compile_definitions(_CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE)
else()
endif()
@@ -62,7 +62,7 @@ endif()
# Use 64-bit off_t on 32-bit Linux
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
# ensure 64bit offsets are used for filesystem accesses for 32bit compilation
- add_definitions(-D_FILE_OFFSET_BITS=64)
+ add_compile_definitions(_FILE_OFFSET_BITS=64)
endif()
# Workaround for TOC Overflow on ppc64