Skip to content

Commit 324d159

Browse files
committed
refactor CMake scripts: streamline INSTALL_COMMAND formatting and adjust target linking
1 parent 66b0556 commit 324d159

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

cmake/gtest.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ ExternalProject_Add(
1919
$<$<BOOL:MSVC>:-Dgtest_force_shared_crt=ON>
2020
BUILD_COMMAND
2121
"${CMAKE_COMMAND}" --build
22-
"${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config
23-
$<CONFIG> --parallel
22+
"${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config $<CONFIG>
23+
--parallel
2424
INSTALL_COMMAND
2525
"${CMAKE_COMMAND}" --install
26-
"${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config $<CONFIG> --prefix
27-
"${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/install")
26+
"${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/build" --config $<CONFIG>
27+
--prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_googletest/install")
2828

2929
function(ppc_link_gtest exec_func_lib)
3030
# Add external project include directories

cmake/libenvpp.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ExternalProject_Add(
1818
--config $<CONFIG> --parallel
1919
INSTALL_COMMAND
2020
"${CMAKE_COMMAND}" --install
21-
"${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --config $<CONFIG> --prefix
22-
"${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install")
21+
"${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --config $<CONFIG>
22+
--prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install")
2323

2424
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
2525
if(cmake_build_type_lower STREQUAL "debug")
@@ -48,7 +48,6 @@ function(ppc_link_envpp exec_func_lib)
4848
target_link_directories(${exec_func_lib} PUBLIC
4949
"${CMAKE_BINARY_DIR}/ppc_libenvpp/build")
5050
target_link_libraries(${exec_func_lib} PUBLIC ${PPC_ENVPP_LIB_NAME})
51-
target_link_libraries(${exec_func_lib} PUBLIC
52-
$<$<CONFIG:Debug>:fmtd>
53-
$<$<NOT:$<CONFIG:Debug>>:fmt>)
51+
target_link_libraries(${exec_func_lib} PUBLIC $<$<CONFIG:Debug>:fmtd>
52+
$<$<NOT:$<CONFIG:Debug>>:fmt>)
5453
endfunction()

0 commit comments

Comments
 (0)