Modify CMake commands in Boost build-up scripts to use platform-independent form

This commit is contained in:
Roberto Di Remigio 2015-11-09 21:53:26 -05:00
parent 7c4dac37ce
commit 6dd61417bb
6 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,7 @@
# Detect, build, and link Boost libraries. # Detect, build, and link Boost libraries.
# This modules downloads the .zip archive from SourceForge at # This modules downloads the .zip archive from SourceForge at
# Autocmake update time. # Autocmake update time.
# Note that the build-up commands are not Windows-compatible!
# #
# Your autocmake.cfg should look like this:: # Your autocmake.cfg should look like this::
# #
@ -164,7 +165,7 @@ if(BUILD_CUSTOM_BOOST)
set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR}) set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
if(CMAKE_SYSTEM_NAME MATCHES "Linux") if(CMAKE_SYSTEM_NAME MATCHES Linux)
list(APPEND Boost_LIBRARIES rt) list(APPEND Boost_LIBRARIES rt)
endif() endif()
endif() endif()

View File

@ -1,4 +1,5 @@
# Build Boost # Build Boost
# This is not Windows-friendly!
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.built OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.built
COMMAND ./b2 toolset=${toolset} variant=${type} link=static cxxflags=-fPIC COMMAND ./b2 toolset=${toolset} variant=${type} link=static cxxflags=-fPIC

View File

@ -1,4 +1,5 @@
# Run bootstrap.sh to configure the build. We will install in ${PROJECT_BINARY_DIR}/boost # Run bootstrap.sh to configure the build. We will install in ${PROJECT_BINARY_DIR}/boost
# This is not Windows-friendly!
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.configured OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.configured
COMMAND ./bootstrap.sh --with-toolset=${toolset} COMMAND ./bootstrap.sh --with-toolset=${toolset}

View File

@ -1,4 +1,5 @@
# Install Boost # Install Boost
# This is not Windows-friendly!
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.installed
COMMAND ./b2 install toolset=${toolset} variant=${type} link=static COMMAND ./b2 install toolset=${toolset} variant=${type} link=static

View File

@ -2,7 +2,7 @@
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.unpacked OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.unpacked
COMMAND ${CMAKE_COMMAND} -E tar xzf ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE} COMMAND ${CMAKE_COMMAND} -E tar xzf ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE}
COMMAND touch boost.unpacked COMMAND ${CMAKE_COMMAND} -E touch boost.unpacked
DEPENDS ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE} DEPENDS ${BOOST_ARCHIVE_LOCATION}/${BOOST_ARCHIVE}
WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION} WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION}
COMMENT "Unpacking Boost") COMMENT "Unpacking Boost")

View File

@ -9,7 +9,7 @@ file(WRITE ${CUSTOM_BOOST_LOCATION}/user-config.jam ${MPI_SENT})
add_custom_command( add_custom_command(
OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.user-config OUTPUT ${CUSTOM_BOOST_LOCATION}/boost.user-config
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CUSTOM_BOOST_LOCATION}/user-config.jam ${BOOST_BUILD_DIR}/user-config.jam COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CUSTOM_BOOST_LOCATION}/user-config.jam ${BOOST_BUILD_DIR}/user-config.jam
COMMAND touch boost.user-config COMMAND ${CMAKE_COMMAND} -E touch boost.user-config
DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.unpacked DEPENDS ${CUSTOM_BOOST_LOCATION}/boost.unpacked
WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION} WORKING_DIRECTORY ${CUSTOM_BOOST_LOCATION}
COMMENT "Generating user-config.jam") COMMENT "Generating user-config.jam")