View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015567CMakeCMakepublic2015-05-14 01:472015-11-02 09:15
ReporterRuslan Baratov 
Assigned ToDaniele E. Domenichelli 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.2.1 
Target VersionCMake 3.3Fixed in VersionCMake 3.3 
Summary0015567: "LOG_CONFIGURE 1" breaks ExternalProject_Add with empty CONFIGURE_COMMAND
DescriptionIn case when CONFIGURE_COMMAND of ExternalProject_Add is optional and can be empty setting LOG_CONFIGURE 1 lead to error:
    
    *-configure.cmake:4 (execute_process):
      execute_process given COMMAND argument with no value.
Steps To ReproduceWorks fine:

    cmake_minimum_required(VERSION 3.0)
    project(Foo)

    include(ExternalProject)

    set(configure "")

    ExternalProject_Add(
        Foo
        DOWNLOAD_COMMAND ""
        CONFIGURE_COMMAND ${configure}
        COMMAND "${CMAKE_COMMAND}" -E echo ""
        BUILD_COMMAND ""
        INSTALL_COMMAND ""
    )

Not working:

    cmake_minimum_required(VERSION 3.0)
    project(Foo)

    include(ExternalProject)

    set(configure "")

    ExternalProject_Add(
        Foo
        DOWNLOAD_COMMAND ""
        CONFIGURE_COMMAND ${configure}
        COMMAND "${CMAKE_COMMAND}" -E echo ""
        BUILD_COMMAND ""
        INSTALL_COMMAND ""
        LOG_CONFIGURE 1
    )
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038778)
Daniele E. Domenichelli (developer)
2015-05-20 09:56

This happens because the first argument of the CONFIGURE_COMMAND becomes COMMAND and add_custom_command accepts it, but execute process does not: i.e.

   add_custom_command(OUTPUT foo
                      COMMAND
                      COMMAND /usr/bin/cmake -E echo add_custom_command)
   add_custom_target(bar ALL
                     DEPENDS foo)

Works, but

   execute_process(COMMAND
                   COMMAND /usr/bin/cmake -E echo execute_process)

fails.


I pushed a fix in topic ExternalProject_FixLog:

   ExternalProject: Fix log when the first arg of commands is "COMMAND" (0015567)
   http://www.cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=a0d620d [^]
(0038780)
Daniele E. Domenichelli (developer)
2015-05-20 10:53

Hello Brad,
You marked this bug as fixed, but I don't see the commit yet in master...
Should I merge it in next?
(0038782)
Brad King (manager)
2015-05-20 11:04

Re 0015567:0038780: Oops, I missed that it is not in 'next' yet.
(0038788)
Brad King (manager)
2015-05-21 09:16

The fix linked in 0015567:0038778 is now in 'master'.
(0039819)
Robert Maynard (manager)
2015-11-02 09:15

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-05-14 01:47 Ruslan Baratov New Issue
2015-05-20 09:56 Daniele E. Domenichelli Note Added: 0038778
2015-05-20 09:59 Brad King Assigned To => Daniele E. Domenichelli
2015-05-20 09:59 Brad King Status new => resolved
2015-05-20 09:59 Brad King Resolution open => fixed
2015-05-20 09:59 Brad King Fixed in Version => CMake 3.3
2015-05-20 09:59 Brad King Target Version => CMake 3.3
2015-05-20 10:53 Daniele E. Domenichelli Note Added: 0038780
2015-05-20 11:04 Brad King Note Added: 0038782
2015-05-20 11:04 Brad King Status resolved => assigned
2015-05-20 11:04 Brad King Resolution fixed => open
2015-05-20 11:04 Brad King Fixed in Version CMake 3.3 =>
2015-05-21 09:16 Brad King Note Added: 0038788
2015-05-21 09:16 Brad King Status assigned => resolved
2015-05-21 09:16 Brad King Resolution open => fixed
2015-05-21 09:16 Brad King Fixed in Version => CMake 3.3
2015-11-02 09:15 Robert Maynard Note Added: 0039819
2015-11-02 09:15 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team