ExternalProject: Simplify CMake command line generation
Append the source directory to the command line option in a separate step instead of duplicating it with each possible generator.
This commit is contained in:
parent
7ecaa4047b
commit
5b2fba5d40
|
@ -1586,15 +1586,16 @@ function(_ep_add_configure_command name)
|
||||||
|
|
||||||
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
|
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
|
||||||
if(cmake_generator)
|
if(cmake_generator)
|
||||||
list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
|
list(APPEND cmd "-G${cmake_generator}")
|
||||||
else()
|
else()
|
||||||
if(CMAKE_EXTRA_GENERATOR)
|
if(CMAKE_EXTRA_GENERATOR)
|
||||||
list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
|
list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
|
||||||
"${source_dir}")
|
|
||||||
else()
|
else()
|
||||||
list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
|
list(APPEND cmd "-G${CMAKE_GENERATOR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
list(APPEND cmd "${source_dir}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If anything about the configure command changes, (command itself, cmake
|
# If anything about the configure command changes, (command itself, cmake
|
||||||
|
|
Loading…
Reference in New Issue