summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 02:01:17 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:47 (GMT)
commitae174f0dead780869fa2339bfa3a52a6117b8728 (patch)
tree1a0498e057b0d081394b3dcc6ce4f2f2c5672e45
parent9a24c648ebdc50495bf113a34373d0372bda125b (diff)
downloadCMake-ae174f0dead780869fa2339bfa3a52a6117b8728.zip
CMake-ae174f0dead780869fa2339bfa3a52a6117b8728.tar.gz
CMake-ae174f0dead780869fa2339bfa3a52a6117b8728.tar.bz2
Build: Move `CMAKE_USE_WMAKE` definition to `cmConfigure.cmake.h.in`
-rw-r--r--Source/CMakeLists.txt8
-rw-r--r--Source/cmConfigure.cmake.h.in1
2 files changed, 7 insertions, 2 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index c182f2e..1901f68 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -31,6 +31,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(CMake_USE_XCOFF_PARSER 1)
endif()
+# Watcom support
+if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(CMAKE_USE_WMAKE 1)
+endif()
+
set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
if(WIN32)
@@ -861,8 +866,7 @@ if(WIN32)
endif()
# Watcom support
-if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- set_property(SOURCE cmake.cxx APPEND PROPERTY COMPILE_DEFINITIONS CMAKE_USE_WMAKE)
+if(CMAKE_USE_WMAKE)
target_sources(
CMakeLib
PUBLIC
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 31d03da..ea7569f 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -22,6 +22,7 @@
#cmakedefine HAVE_UNSETENV
#cmakedefine CMake_USE_MACH_PARSER
#cmakedefine CMake_USE_XCOFF_PARSER
+#cmakedefine CMAKE_USE_WMAKE
#define CMake_DEFAULT_RECURSION_LIMIT @CMake_DEFAULT_RECURSION_LIMIT@
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"