[llvm] r349846 - Fix Windows build failures caused by r349839
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 14:36:02 PST 2018
Author: tstellar
Date: Thu Dec 20 14:36:02 2018
New Revision: 349846
URL: http://llvm.org/viewvc/llvm-project?rev=349846&view=rev
Log:
Fix Windows build failures caused by r349839
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=349846&r1=349845&r2=349846&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Dec 20 14:36:02 2018
@@ -635,7 +635,10 @@ macro(add_llvm_library name)
set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
endif()
- if( EXCLUDE_FROM_ALL )
+ if (ARG_MODULE AND NOT TARGET ${name})
+ # Add empty "phony" target
+ add_custom_target(${name})
+ elseif( EXCLUDE_FROM_ALL )
set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
elseif(ARG_BUILDTREE_ONLY)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name})
@@ -674,13 +677,10 @@ macro(add_llvm_library name)
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endif()
- set_target_properties(${name} PROPERTIES FOLDER "Libraries")
- if(NOT TARGET ${name})
- # Add empty "phony" target
- add_custom_target(${name})
- endif()
if (ARG_MODULE)
set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
+ else()
+ set_target_properties(${name} PROPERTIES FOLDER "Libraries")
endif()
endmacro(add_llvm_library name)
More information about the llvm-commits
mailing list