Skip to content

Commit

Permalink
Pliris: Remove local var hiding cache var Pliris_ENABLE_DREAL (trilin…
Browse files Browse the repository at this point in the history
…os#10774, TriBITSPub/TriBITS#516)

A TriBITS update is exporting package cache vars to the <Package>Config.cmake
file and you can't have a local var with the same name as a cache var with
different values.

In this case, it was just lucky that no downstream package was reading this
var (through the cache var) because they would have gotten the wrong value.
It seems that only code in CMakeLists.txt files under packages/pliris/ were
reading this var.
  • Loading branch information
bartlettroscoe committed Aug 24, 2022
1 parent 54277ec commit 3663abb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/pliris/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SCPLX
"Enable single precision complex functionality."
OFF )

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_DREAL
DREAL
"Set reals to double precision."
OFF )

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SREAL
SREAL
"Set reals to single precision."
Expand All @@ -37,11 +32,16 @@ TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SREAL
#If no options are specified set DREAL as the default
IF(NOT ${PACKAGE_NAME}_ENABLE_ZCPLX AND
NOT ${PACKAGE_NAME}_ENABLE_SCPLX AND
NOT ${PACKAGE_NAME}_ENABLE_SREAL AND
NOT ${PACKAGE_NAME}_ENABLE_DREAL)

SET(${PACKAGE_NAME}_ENABLE_DREAL ON)
NOT ${PACKAGE_NAME}_ENABLE_SREAL
)
SET(${PACKAGE_NAME}_ENABLE_DREAL_DEFAULT ON)
ELSE()
SET(${PACKAGE_NAME}_ENABLE_DREAL_DEFAULT OFF)
ENDIF()
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_DREAL
DREAL
"Set reals to double precision."
${${PACKAGE_NAME}_ENABLE_DREAL_DEFAULT} )

ADD_SUBDIRECTORY(src)

Expand Down

0 comments on commit 3663abb

Please sign in to comment.