This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
fix build error when Boost CONFIG_MACRO is the last of the CMAKE_ARGS #1220
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
162cb26
change Boost-custom-args example to test build error
ibasurto 9843117
fix build error when Boost CONFIG_MACRO is the last of CMAKE_ARGS
ibasurto b2d4dba
add test for append-boost-config-macros.cmake script
ibasurto ed1e2fd
Revert "change Boost-custom-args example to test build error"
ibasurto 6eb4ed8
skip the first three args in append-boost-config-macros.cmake script
ibasurto e5f2559
increase PACKAGE_INTERNAL_DEPS_ID after change in script used by url_…
ibasurto aaf96ee
add test for append-boost-config-macros.cmake script with quotes& spaces
ibasurto e4ab64b
don’t use CMAKE_ARGS for the append-boost-config-macros.cmake script
ibasurto cbc9e7b
remove cmake_minimum_required() in hunter_parse_boost_config_macros
ibasurto 46bbfaa
use simple endfunction() in hunter_parse_boost_config_macros
ibasurto b2a1546
remove ‘in’ added by mistake in the foreach() in hunter_parse_boost_c…
ibasurto 8205615
use configure_file() to pass config macros to append-boost-config-mac…
ibasurto File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
function(hunter_parse_boost_config_macros outvar) | ||
# parse ARGN to convert 'CONFIG_MACRO=id1;id2;CONFIG_MACRO_id3=3' to 'id1;id2;id3=3' | ||
unset(boost_config_macros_list) | ||
set(config_macros_without_value_mode FALSE) | ||
foreach(arg in ${ARGN}) | ||
if ("${arg}" MATCHES "[^=]+=.+") | ||
set(config_macros_without_value_mode FALSE) | ||
endif() | ||
if(config_macros_without_value_mode) | ||
# CONFIG_MACRO=id_1 id_2 ... id_n -> APPEND id_n | ||
list(APPEND boost_config_macros_list "${arg}") | ||
elseif("${arg}" MATCHES "^CONFIG_MACRO=(.+)" ) | ||
# CONFIG_MACRO=id_1 id_2 ... id_n -> APPEND id_1 | ||
list(APPEND boost_config_macros_list "${CMAKE_MATCH_1}") | ||
set(config_macros_without_value_mode TRUE) | ||
elseif("${arg}" MATCHES "^CONFIG_MACRO_([^=]+=.+)" ) | ||
# CONFIG_MACRO_id=val -> APPEND id=val | ||
list(APPEND boost_config_macros_list "${CMAKE_MATCH_1}") | ||
endif() | ||
endforeach() | ||
set(${outvar} ${boost_config_macros_list} PARENT_SCOPE) | ||
endfunction(hunter_parse_boost_config_macros) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
atomic | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
chrono | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
context | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
graph | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
locale | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
log | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
math | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -26,5 +26,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
mpi | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
python | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
random | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
regex | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ include(hunter_status_debug) | |
include(hunter_status_print) | ||
include(hunter_test_string_not_empty) | ||
include(hunter_user_error) | ||
include(hunter_parse_boost_config_macros) | ||
|
||
hunter_status_debug("Scheme: url_sha1_boost") | ||
|
||
|
@@ -95,6 +96,8 @@ else() | |
set(log_opts "") | ||
endif() | ||
|
||
hunter_parse_boost_config_macros(boost_config_macros_list "@HUNTER_Boost_CMAKE_ARGS@") | ||
|
||
ExternalProject_Add( | ||
"@HUNTER_EP_NAME@" | ||
URL | ||
|
@@ -109,9 +112,9 @@ ExternalProject_Add( | |
"@HUNTER_PACKAGE_INSTALL_PREFIX@" | ||
# not used, just avoid creating Install/<name> empty directory | ||
UPDATE_COMMAND | ||
"@CMAKE_COMMAND@" -P | ||
"@HUNTER_GLOBAL_SCRIPT_DIR@/append-boost-config-macros.cmake" | ||
"@HUNTER_Boost_CMAKE_ARGS@" | ||
"@CMAKE_COMMAND@" | ||
"-DBOOST_CONFIG_MACROS=${boost_config_macros_list}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This line converted to |
||
-P "@HUNTER_GLOBAL_SCRIPT_DIR@/append-boost-config-macros.cmake" | ||
CONFIGURE_COMMAND | ||
${env_cmd} | ||
COMMAND | ||
|
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
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
signals | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
system | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
test | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
thread | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
timer | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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 |
---|---|---|
|
@@ -18,5 +18,5 @@ hunter_download( | |
Boost | ||
PACKAGE_COMPONENT | ||
wave | ||
PACKAGE_INTERNAL_DEPS_ID "18" | ||
PACKAGE_INTERNAL_DEPS_ID "19" | ||
) |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, we will inherit policies from parent.