From 1bcacccce9e60800ea826c7e79012a64fec4e687 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 21 Aug 2022 06:09:55 +0400 Subject: Build: Move `STAT_HAS_ST_MTIM`, `STAT_HAS_ST_MTIMESPEC` to config file --- Source/CMakeLists.txt | 18 ++++++++---------- Source/cmConfigure.cmake.h.in | 3 +++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index aa74ed5..1182483 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -36,6 +36,14 @@ if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Da set(CMAKE_USE_WMAKE 1) endif() +foreach(check IN ITEMS STAT_HAS_ST_MTIM STAT_HAS_ST_MTIMESPEC) + if(KWSYS_CXX_${check}_COMPILED) # abuse KWSys check cache entry + set(CMake_${check} 1) + else() + set(CMake_${check} 0) + endif() +endforeach() + set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR}) if(WIN32) @@ -902,16 +910,6 @@ if(WIN32 AND NOT CYGWIN) target_link_libraries(cmcldeps PRIVATE CMakeLib) endif() -foreach(check IN ITEMS STAT_HAS_ST_MTIM STAT_HAS_ST_MTIMESPEC) - if(KWSYS_CXX_${check}_COMPILED) # abuse KWSys check cache entry - set(CMake_${check} 1) - else() - set(CMake_${check} 0) - endif() - set_property(SOURCE cmFileTime.cxx APPEND PROPERTY - COMPILE_DEFINITIONS CMake_${check}=${CMake_${check}}) -endforeach() - if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") # the atomic instructions are implemented using libatomic on some platforms, # so linking to that may be required diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 398b493..7dc9d62 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -36,3 +36,6 @@ #cmakedefine CURL_CA_BUNDLE "@CURL_CA_BUNDLE@" #cmakedefine CURL_CA_PATH "@CURL_CA_PATH@" + +#cmakedefine01 CMake_STAT_HAS_ST_MTIM +#cmakedefine01 CMake_STAT_HAS_ST_MTIMESPEC -- cgit v0.12