mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 11:39:48 +00:00
CMakeAddFortranSubdirectory: Simplfy logic to always build subdir
In the case that we use ExternalProject_Add to drive the subdirectory build, replace the `forcebuild` step with the official `BUILD_ALWAYS` option. Issue: #20179
This commit is contained in:
parent
228dc92b09
commit
a7b844d6d4
@ -149,17 +149,9 @@ function(cmake_add_fortran_subdirectory subdir)
|
||||
-P ${build_dir}/config_mingw.cmake
|
||||
BUILD_COMMAND ${CMAKE_COMMAND}
|
||||
-P ${build_dir}/build_mingw.cmake
|
||||
BUILD_ALWAYS 1
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
# make the external project always run make with each build
|
||||
externalproject_add_step(${project_name}_build forcebuild
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E rm -f
|
||||
${CMAKE_CURRENT_BUILD_DIR}/${project_name}-prefix/src/${project_name}-stamp/${project_name}-build
|
||||
DEPENDEES configure
|
||||
DEPENDERS build
|
||||
ALWAYS 1
|
||||
)
|
||||
# create imported targets for all libraries
|
||||
foreach(lib ${libraries})
|
||||
add_library(${lib} SHARED IMPORTED GLOBAL)
|
||||
|
Loading…
Reference in New Issue
Block a user