Dont require setenv() in non Unix systems

config/CMakeLists.txt failed with a fatal error if the functions
setenv  could not be found, however this functions only exist in Unix
systems.
This commit is contained in:
Rui Abreu Ferreira 2014-07-01 10:25:51 +01:00
parent ac42fb8ca7
commit 82c36970b8

View File

@ -59,7 +59,7 @@ check_function_exists(putenv HAVE_PUTENV)
check_function_exists(opendir HAVE_OPENDIR) check_function_exists(opendir HAVE_OPENDIR)
check_function_exists(readlink HAVE_READLINK) check_function_exists(readlink HAVE_READLINK)
check_function_exists(setenv HAVE_SETENV) check_function_exists(setenv HAVE_SETENV)
if(NOT HAVE_SETENV) if(UNIX AND NOT HAVE_SETENV)
message(SEND_ERROR "setenv() function not found on your system.") message(SEND_ERROR "setenv() function not found on your system.")
endif() endif()
check_function_exists(unsetenv HAVE_UNSETENV) check_function_exists(unsetenv HAVE_UNSETENV)