Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding configuration summary to cmake output and --hpx:info
- Loading branch information
Showing
5 changed files
with
90 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright (c) 2017 Hartmut Kaiser | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
get_property(DEFINITIONS_VARS GLOBAL PROPERTY HPX_CONFIG_DEFINITIONS) | ||
if(DEFINED DEFINITIONS_VARS) | ||
list(SORT DEFINITIONS_VARS) | ||
list(REMOVE_DUPLICATES DEFINITIONS_VARS) | ||
endif() | ||
|
||
set(hpx_config_information) | ||
|
||
message("") | ||
hpx_info("Configuration summary:") | ||
get_cmake_property(_variableNames CACHE_VARIABLES) | ||
foreach (_variableName ${_variableNames}) | ||
if(${_variableName}Category) | ||
|
||
# handle only opetions which start with HPX_WITH_ | ||
string(FIND ${_variableName} "HPX_WITH_" __pos) | ||
if(NOT ${__pos} EQUAL -1) | ||
get_property(_value CACHE "${_variableName}" PROPERTY VALUE) | ||
hpx_info(" ${_variableName}=${_value}") | ||
|
||
string(REPLACE "_WITH_" "_HAVE_" __variableName ${_variableName}) | ||
list(FIND DEFINITIONS_VARS ${__variableName} __pos) | ||
if(NOT ${__pos} EQUAL -1) | ||
set(hpx_config_information | ||
"${hpx_config_information}" | ||
"\n \"${_variableName}=${_value}\",") | ||
elseif(NOT ${_variableName}Category STREQUAL "Generic" AND NOT ${_variableName}Category STREQUAL "Build Targets") | ||
get_property(_type CACHE "${_variableName}" PROPERTY TYPE) | ||
if(_type STREQUAL "BOOL") | ||
set(hpx_config_information | ||
"${hpx_config_information}" | ||
"\n \"${_variableName}=OFF\",") | ||
endif() | ||
endif() | ||
|
||
endif() | ||
endif() | ||
endforeach() | ||
|
||
if(hpx_config_information) | ||
string(REPLACE ";" "" hpx_config_information ${hpx_config_information}) | ||
endif() | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/cmake/templates/config_defines_strings.hpp.in" | ||
"${CMAKE_BINARY_DIR}/hpx/config/config_strings.hpp" | ||
@ONLY) | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/cmake/templates/config_defines_strings.hpp.in" | ||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hpx/config/config_strings.hpp" | ||
@ONLY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2017 Hartmut Kaiser | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
// Do not edit this file! It has been generated by the cmake configuration step. | ||
|
||
#if !defined(HPX_CONFIG_DEFINES_STRINGS_HPP) | ||
#define HPX_CONFIG_DEFINES_STRINGS_HPP | ||
|
||
namespace hpx | ||
{ | ||
char const* const config_strings[] = | ||
{@hpx_config_information@ | ||
nullptr | ||
}; | ||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters