Skip to content

Commit

Permalink
HPCC-29864 Relocate some options to after the project statement
Browse files Browse the repository at this point in the history
All options that use builtin cmake variables, need to be relocated to
after the project statement

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jul 7, 2023
1 parent b6f02c5 commit bab9ab6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 38 deletions.
24 changes: 21 additions & 3 deletions cmake_modules/commonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,28 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
set(DEVEL OFF)
endif()

option(PORTALURL "Set url to hpccsystems portal download page")
# The following options need to be set after the project() command
if (WIN32)
option(USE_AERON "Include the Aeron message protocol" OFF)
else()
option(USE_AERON "Include the Aeron message protocol" ON)
endif()
if (APPLE OR WIN32)
option(USE_NUMA "Configure use of numa" OFF)
else()
option(USE_NUMA "Configure use of numa" ON)
endif()
IF (WIN32)
option(USE_NATIVE_LIBRARIES "Search standard OS locations (otherwise in EXTERNALS_DIRECTORY) for 3rd party libraries" OFF)
ELSE()
option(USE_NATIVE_LIBRARIES "Search standard OS locations (otherwise in EXTERNALS_DIRECTORY) for 3rd party libraries" ON)
ENDIF()

if ( NOT PORTALURL )
set( PORTALURL "http://hpccsystems.com/download" )
# Generates code that is more efficient, but will cause problems if target platforms do not support it.
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
option(USE_INLINE_TSC "Inline calls to read TSC (time stamp counter)" ON)
else()
option(USE_INLINE_TSC "Inline calls to read TSC (time stamp counter)" OFF)
endif()

if(UNIX AND SIGN_MODULES)
Expand Down
36 changes: 7 additions & 29 deletions cmake_modules/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,11 @@ option(USE_OPENSSLV3 "Configure use of OpenSSL Version 3 or newer" ON)
option(USE_ZLIB "Configure use of zlib" ON)
option(USE_AZURE "Configure use of azure" ON)
option(USE_GIT "Configure use of GIT (Hooks)" ON)
if (WIN32)
option(USE_AERON "Include the Aeron message protocol" OFF)
else()
option(USE_AERON "Include the Aeron message protocol" ON)
endif()
option(USE_LIBARCHIVE "Configure use of libarchive" ON)
option(USE_URIPARSER "Configure use of uriparser" OFF)
if (APPLE OR WIN32)
option(USE_NUMA "Configure use of numa" OFF)
else()
option(USE_NUMA "Configure use of numa" ON)
endif()
option(USE_AWS "Configure use of aws" ON)
option(STRIP_RELEASE_SYMBOLS "Strip symbols from release builds" OFF)

IF (WIN32)
option(USE_NATIVE_LIBRARIES "Search standard OS locations (otherwise in EXTERNALS_DIRECTORY) for 3rd party libraries" OFF)
ELSE()
option(USE_NATIVE_LIBRARIES "Search standard OS locations (otherwise in EXTERNALS_DIRECTORY) for 3rd party libraries" ON)
ENDIF()

option(USE_GIT_DESCRIBE "Use git describe to generate build tag" ON)
option(CHECK_GIT_TAG "Require git tag to match the generated build tag" OFF)
option(USE_XALAN "Configure use of xalan" OFF)
Expand All @@ -70,19 +54,9 @@ option(USE_PYTHON2 "Enable python2 language support for platform build" OFF)
option(USE_PYTHON3 "Enable python3 language support for platform build" ON)
option(USE_OPTIONAL "Automatically disable requested features with missing dependencies" ON)
option(JLIB_ONLY "Build JLIB for other projects such as Configurator, Ganglia Monitoring, etc" OFF)
# Generates code that is more efficient, but will cause problems if target platforms do not support it.
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
option(USE_INLINE_TSC "Inline calls to read TSC (time stamp counter)" ON)
else()
option(USE_INLINE_TSC "Inline calls to read TSC (time stamp counter)" OFF)
endif()
if (APPLE OR WIN32)
option(USE_TBB "Enable Threading Building Block support" OFF)
else()
option(USE_TBB "Enable Threading Building Block support" OFF)
option(USE_TBBMALLOC "Enable Threading Building Block scalable allocator proxy support" OFF)
option(USE_TBBMALLOC_ROXIE "Enable Threading Building Block scalable allocator proxy support in Roxie" OFF)
endif()
option(USE_TBB "Enable Threading Building Block support" OFF)
option(USE_TBBMALLOC "Enable Threading Building Block scalable allocator proxy support" OFF)
option(USE_TBBMALLOC_ROXIE "Enable Threading Building Block scalable allocator proxy support in Roxie" OFF)
option(LOGGING_SERVICE "Configure use of logging service" ON)
option(WSSQL_SERVICE "Configure use of ws_sql service" ON)
option(USE_DIGISIGN "Use digisign" ON)
Expand All @@ -93,6 +67,10 @@ option(USE_ELASTICSTACK_CLIENT "Configure use of Elastic Stack client" ON)
option(SKIP_ECLWATCH "Skip building ECL Watch" OFF)
option(USE_ADDRESS_SANITIZER "Use address sanitizer to spot leaks" OFF)
option(INSTALL_VCPKG_CATALOG "Install vcpkg-catalog.txt" ON)
option(PORTALURL "Set url to hpccsystems portal download page")
if ( NOT PORTALURL )
set( PORTALURL "http://hpccsystems.com/download" )
endif()

if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set ( CMAKE_BUILD_TYPE "Release" )
Expand Down
5 changes: 0 additions & 5 deletions cmake_modules/plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ if (USE_LIBXALAN)
set(VCPKG_LIBXALAN "${VCPKG_INCLUDE}")
endif()

set(VCPKG_NUMA "${VCPKG_SUPPRESS}")
if (USE_NUMA)
set(VCPKG_NUMA "${VCPKG_INCLUDE}")
endif()

set(VCPKG_OPENLDAP "${VCPKG_SUPPRESS}")
if (USE_OPENLDAP)
set(VCPKG_OPENLDAP "${VCPKG_INCLUDE}")
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},
{
"name": "numactl",
"platform": "@VCPKG_NUMA@ & !windows & !osx"
"platform": "!windows & !osx"
},
{
"name": "openblas",
Expand Down

0 comments on commit bab9ab6

Please sign in to comment.