mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 12:53:55 +08:00
cmSystemTools: Hard-code try_compile results for Windows
All Windows platforms offer `environ` in `stdlib.h` and do not have `unsetenv`.
This commit is contained in:
@@ -711,11 +711,16 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
|
|||||||
include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
|
include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# no clue why we are testing for this here
|
# Checks for cmSystemTools.
|
||||||
|
if(WIN32)
|
||||||
|
set(HAVE_UNSETENV 0)
|
||||||
|
set(HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE 1)
|
||||||
|
else()
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
|
CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV)
|
||||||
CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
|
CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.
|
# CMAKE_TESTS_CDASH_SERVER: CDash server used by CMake/Tests.
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user