]> granicus.if.org Git - check/commitdiff
cmake: use set() to set HAVE_FORK variable
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:31 +0000 (03:04 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 25 Dec 2013 03:04:31 +0000 (03:04 +0000)
In Windows, the add_definitions() call does not set the
HAVE_FORK variable for configuration files (check.h.in, test_var.in).

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@949 64e312b2-a51f-0410-8e61-82d0ca0eb02a

CMakeLists.txt

index 5b056e63a9418156a0c7e9026c6ce53c7b7897b1..7a4e19341576f23b47f55e3a651a21649ecd22b6 100644 (file)
@@ -192,8 +192,10 @@ check_function_exists(_write HAVE__WRITE)
 
 if(HAVE_FORK)
     add_definitions(-DHAVE_FORK=1)
+    set(HAVE_FORK 1)
 else(HAVE_FORK)
     add_definitions(-DHAVE_FORK=0)
+    set(HAVE_FORK 0)
 endif(HAVE_FORK)
 
 ###############################################################################