From 924147f9353ef971d5e6acbdde6c7e84a8084b7d Mon Sep 17 00:00:00 2001 From: Kalin Kiesling Date: Fri, 25 Mar 2022 14:28:52 -0500 Subject: [PATCH] alias targets --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba8a79efa5..0c2f5cb435 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,6 +386,8 @@ else() add_library(libopenmc SHARED ${libopenmc_SOURCES}) endif() +add_library(OpenMC::libopenmc ALIAS libopenmc) + # Avoid vs error lnk1149 :output filename matches input filename if(NOT MSVC) set_target_properties(libopenmc PROPERTIES OUTPUT_NAME openmc) @@ -453,6 +455,7 @@ endif() # openmc executable #=============================================================================== add_executable(openmc src/main.cpp) +add_executable(OpenMC::openmc ALIAS openmc) target_compile_options(openmc PRIVATE ${cxxflags}) target_include_directories(openmc PRIVATE ${CMAKE_BINARY_DIR}/include) target_link_libraries(openmc libopenmc)