Trilinos: rol/CMakeLists.txt bug

Created on 11 Jul 2017  路  4Comments  路  Source: trilinos/Trilinos

Just ran into a problem trying to configure Trilinos: When you don't have -D Trilinos_ENABLE_DEBUG:BOOL=ON or OFF in your config script, @trilinos/rol's CMakeLists.txt file runs into a problem with

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_DEBUG
  HAVE_ROL_DEBUG
  "Enable a host of runtime debug checking."
  ${Trilinos_ENABLE_DEBUG}
  )

because ${Trilinos_ENABLE_DEBUG} is empty, and TRIBITS_ADD_OPTION_AND_DEFINE therefore isn't getting the correct number of arguments. The quick fix was to add -D Trilinos_ENABLE_DEBUG:BOOL=OFF to my config script, but it seems like this CMakeLists.txt file should be more robust than that. You may be able to replace ${Trilinos_ENABLE_DEBUG} with ${${PROJECT_NAME}_ENABLE_DEBUG}, and things would just work, or you could check to make sure that last argument to TRIBITS_ADD_OPTION_AND_DEFINE is empty and replace it with OFF if it is.

Alternatively, this may be entirely user error—@trilinos/framework, does -D Trilinos_ENABLE_DEBUG=? need to be specified? If so, my mistake.

ROL bug question

All 4 comments

That is a defect in ROL. I will file github issue and fix tomorrow.

-Ross


From: Jason M. Gates notifications@github.com
Sent: Monday, July 10, 2017 6:57:28 PM
To: trilinos/Trilinos
Cc: Bartlett, Roscoe A; Team mention
Subject: [EXTERNAL] [trilinos/Trilinos] rol/CMakeLists.txt bug (#1488)

Just ran into a problem trying to configure Trilinos: When you don't have -D Trilinos_ENABLE_DEBUG:BOOL=ON or OFF in your config script, @trilinos/rolhttps://github.com/orgs/trilinos/teams/rol's CMakeLists.txt file runs into a problem with

TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_DEBUG
HAVE_ROL_DEBUG
"Enable a host of runtime debug checking."
${Trilinos_ENABLE_DEBUG}
)

because ${Trilinos_ENABLE_DEBUG} is empty, and TRIBITS_ADD_OPTION_AND_DEFINE therefore isn't getting the correct number of arguments. The quick fix was to add -D Trilinos_ENABLE_DEBUG:BOOL=OFF to my config script, but it seems like this CMakeLists.txt file should be more robust than that. You may be able to replace ${Trilinos_ENABLE_DEBUG} with ${${PROJECT_NAME}_ENABLE_DEBUG}, and things would just work, or you could check to make sure that last argument to TRIBITS_ADD_OPTION_AND_DEFINE is empty and replace it with OFF if it is.

Alternatively, this may be entirely user error-@trilinos/frameworkhttps://github.com/orgs/trilinos/teams/framework, does -D Trilinos_ENABLE_DEBUG=? need to be specified? If so, my mistake.

-
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/trilinos/Trilinos/issues/1488, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB3nOJuwGHQoCJMq95McE86QY7eNePkdks5sMqxYgaJpZM4OThS9.

@jmgate Long answer is that Trilinos packages are supposed to use TRIBITS_ADD_DEBUG_OPTION() to add a debug option to their package, rather than making explicit use of Trilinos_ENABLE_DEBUG.

Should be fixed as of commit 00fc3fab5980672 pushed last night.

@jmgate, please let me know if this fixes the issue for you (without having to set -D Trilinos_ENABLE_DEBUG=<something> )

Yup, looks like that does the trick for me. Thanks for the quick turn-around.

Was this page helpful?
0 / 5 - 0 ratings