Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/timw/display-cmake'
Browse files Browse the repository at this point in the history
* origin/topic/timw/display-cmake:
  Add configure --display-cmake argument
  • Loading branch information
timwoj committed Nov 3, 2022
2 parents 68450ea + 04ba603 commit a61352c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
5.2.0-dev.182 | 2022-11-03 08:57:39 -0700

* Add configure --display-cmake argument (Tim Wojtulewicz, Corelight)

5.2.0-dev.180 | 2022-11-03 08:57:07 -0700

* Update external test hashes (Tim Wojtulewicz, Corelight)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0-dev.180
5.2.0-dev.182
17 changes: 15 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--osx-sysroot=PATH path to the OS X SDK to compile against
--osx-min-version=VER minimum OS X version (the deployment target)
--display-cmake don't create build configuration, just output final CMake invocation
Influential Environment Variables (only on first invocation
per build directory):
CC C compiler command
Expand Down Expand Up @@ -160,6 +162,7 @@ remove_cache_entry() {
builddir=build
prefix=/usr/local/zeek
CMakeCacheEntries=""
display_cmake=0
append_cache_entry CMAKE_INSTALL_PREFIX PATH $prefix
append_cache_entry ZEEK_ROOT_DIR PATH $prefix
append_cache_entry ZEEK_SCRIPT_INSTALL_PATH STRING $prefix/share/zeek
Expand Down Expand Up @@ -409,6 +412,9 @@ while [ $# -ne 0 ]; do
--osx-min-version=*)
append_cache_entry CMAKE_OSX_DEPLOYMENT_TARGET STRING $optarg
;;
--display-cmake)
display_cmake=1
;;
*)
echo "Invalid option '$1'. Try $0 --help to see available options."
exit 1
Expand Down Expand Up @@ -458,11 +464,18 @@ cd $builddir
echo "Using $(cmake --version | head -1)"
echo
if [ -n "$CMakeGenerator" ]; then
"$CMakeCommand" -G "$CMakeGenerator" $CMakeCacheEntries $sourcedir
cmake="${CMakeCommand} -G ${CMakeGenerator} ${CMakeCacheEntries} ${sourcedir}"
else
"$CMakeCommand" $CMakeCacheEntries $sourcedir
cmake="${CMakeCommand} ${CMakeCacheEntries} ${sourcedir}"
fi

if [ "${display_cmake}" = 1 ]; then
echo "${cmake}"
exit 0
fi

eval ${cmake} 2>&1

echo "# This is the command used to configure this build" >config.status
echo $command >>config.status
chmod u+x config.status

0 comments on commit a61352c

Please sign in to comment.