fix(build): Correct var retention bug in cmake 45/345/1
authorE. Scott Daniels <daniels@research.att.com>
Fri, 14 Jun 2019 16:30:21 +0000 (12:30 -0400)
committerE. Scott Daniels <daniels@research.att.com>
Fri, 14 Jun 2019 16:30:21 +0000 (12:30 -0400)
The PACK_EXTERNAL flag was not being removed from the
cache after configuring the Makefile. This was causing
the pack external flag to remain set for all subsequent
executions of cmake even if the flag was not given (and
the default of 0 expected).

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I308e5bf64248d9107760ce0669be282437e5d06b

CMakeLists.txt

index ff39103..c9ca0ed 100644 (file)
@@ -193,8 +193,6 @@ else()
        set( need_ext 0 )
 endif()
 
-unset( SKIP_EXTERNALS  CACHE ) # prevent these from being applied next build unless specifically set on comd line
-unset( PACK_EXTERNALS  CACHE )
 
 
 # this gets us round a chicken/egg problem. include files don't exist until make is run
@@ -297,7 +295,7 @@ unset( DEV_PKG  CACHE )                     # prevent from being a hiddent setting if user redoes
 # (sure would be nice if FILEs allowed for globbing; sadlyy it does not.)
 #
 if( PACK_EXTERNALS )
-       message( "including nano and nng libraries in the deb" )
+       message( "+++ including nano and nng libraries in the deb" )
        install( FILES
                ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix}
                ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix_m}
@@ -310,6 +308,9 @@ if( PACK_EXTERNALS )
        )
 endif()
 
+unset( SKIP_EXTERNALS  CACHE ) # prevent these from being applied next build unless specifically set on comd line
+unset( PACK_EXTERNALS  CACHE )
+
 IF( EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
        include( InstallRequiredSystemLibraries )