Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake's BUILD_ONLY Parameter doesn't work when SDK added as ExternalProject_Add #826

Closed
PauGuillamon opened this issue Mar 19, 2018 · 2 comments

Comments

@PauGuillamon
Copy link

What platform/OS are you using?

Ubuntu 14.04

What compiler are you using? what version?

gcc 4.8.4
cmake version 3.8.2

What's your CMake arguments?

set(cmake_args -DCMAKE_INSTALL_PREFIX=${AMAZON_SDK_INSTALLATION_PATH})

include(ExternalProject)
ExternalProject_Add(amazonSdk
	GIT_REPOSITORY "https://github.com/aws/aws-sdk-cpp.git"
	GIT_TAG "1.4.15"
	CMAKE_ARGS -DBUILD_ONLY=\\\"s3;email\\\" LOG_CONFIGURE 1 ${cmake_args}
	PREFIX "${AMAZON_SDK_PATH}"
)

Can you provide a TRACE level log? (sanitize any sensitive information)

[ 23%] Performing update step for 'amazonSdk'
[ 29%] Performing configure step for 'amazonSdk'
CMake Error at /home/pguillamon/sample-repo/build/src/3rdPartyDependencies/amazonSdk/src/amazonSdk-stamp/amazonSdk-configure-.cmake:16 (message):
  Command failed: 1

   '/usr/local/bin/cmake' '-DBUILD_ONLY="s3' 'email"' '-GUnix Makefiles' '/home/pguillamon/sample-repo/build/src/3rdPartyDependencies/amazonSdk/src/amazonSdk'

  See also

    /home/pguillamon/sample-repo/build/src/3rdPartyDependencies/amazonSdk/src/amazonSdk-stamp/amazonSdk-configure-*.log


make[2]: *** [src/3rdPartyDependencies/amazonSdk/src/amazonSdk-stamp/amazonSdk-configure] Error 1

Note the parameter -DBUILD_ONLY="s3;email" has been splitted into two parameters: -DBUILD_ONLY="s3 and email". This is because the script amazonSdk-configure-.cmake generated by cmake uses ; (semicolon) as character separator. It is generated as follows:

set(command "/usr/local/bin/cmake;-DBUILD_ONLY=\"email;s3\";-GUnix Makefiles;/home/pguillamon/sample-repo/build/src/3rdPartyDependencies/amazonSdk/src/amazonSdk")
execute_process(
  COMMAND ${command}
...
@singku
Copy link
Contributor

singku commented Mar 19, 2018

Hi due to the internal manner of ExternalProject_Add processing list, could you please update you scripts from -DBUILD_ONLY=\\\"s3;email\\\" to -DBUILD_ONLY='s3|email' or -DBUILD_ONLY=s3|email. AS WELL AS Adding LIST_SEPARATOR "|" to ExternalProject_Add

So the scripts should look as follow:

ExternalProject_Add(amazonSdk
	GIT_REPOSITORY "https://github.com/aws/aws-sdk-cpp.git"
	GIT_TAG "1.4.15"
        LIST_SEPARATOR "|"
	CMAKE_ARGS -DBUILD_ONLY=s3|email LOG_CONFIGURE 1 ${cmake_args}
	PREFIX "${AMAZON_SDK_PATH}"
)

And try again?

@PauGuillamon
Copy link
Author

I didn't see that parameter. It worked perfectly, thanks a lot!

ExternalProject_Add(${AMAZON_SDK}
    GIT_REPOSITORY "https://github.com/aws/aws-sdk-cpp.git"
    GIT_TAG "1.4.15"
    LIST_SEPARATOR "|"
    CMAKE_ARGS -DBUILD_ONLY=s3|email ${cmake_args}
    PREFIX "${AMAZON_SDK}"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants