mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Create a set of config variables for implementation
The config variables in _CONFIG_IMPL_VARS are only written to config.h and not the .pc or -config.cmake files. They can thus only be used by the implementation files and not the headers. Use this set to avoid exposing the variables to other projects, when it is likely that a probe used by that other project may turn up a different result.
This commit is contained in:
parent
3d366d9cdf
commit
de5d5ec7dc
@ -42,6 +42,7 @@ set (_opm_proj_vars
|
||||
INCLUDE_DIRS
|
||||
LIBRARY_DIRS
|
||||
CONFIG_VARS
|
||||
CONFIG_IMPL_VARS
|
||||
)
|
||||
|
||||
# ensure that they are at least the empty list after we're done
|
||||
|
@ -129,11 +129,13 @@ include (ConfigVars)
|
||||
list (APPEND ${project}_CONFIG_VARS ${${project}_CONFIG_VAR})
|
||||
|
||||
# write configuration variables to this file. note that it is a temporary.
|
||||
# _CONFIG_IMPL_VARS are defines that are only written to config.h internal
|
||||
# to this project; they are not exported to any installed files.
|
||||
message (STATUS "Writing config file \"${PROJECT_BINARY_DIR}/config.h\"...")
|
||||
set (CONFIG_H "${PROJECT_BINARY_DIR}/config.h.tmp")
|
||||
configure_vars (
|
||||
FILE CXX ${CONFIG_H}
|
||||
WRITE ${${project}_CONFIG_VARS}
|
||||
WRITE ${${project}_CONFIG_VARS} ${${project}_CONFIG_IMPL_VARS}
|
||||
)
|
||||
|
||||
# call this hook to let it setup necessary conditions for Fortran support
|
||||
|
Loading…
Reference in New Issue
Block a user