Skip to content

Commit

Permalink
use CMAKE_CURRENT_SOURCE_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-kan committed Dec 20, 2023
1 parent 7cc8e6a commit cd5ce94
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ foreach(mainfile ${mains})
get_filename_component(mainname ${mainfile} NAME_WE)
add_executable(sysu-tester-performance_${mainname} ${mainfile})
target_link_libraries(sysu-tester-performance_${mainname} sysy)
target_include_directories(sysu-tester-performance_${mainname}
PRIVATE ${CMAKE_SOURCE_DIR}/librarian/include)
target_include_directories(
sysu-tester-performance_${mainname}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../librarian/include)
install(TARGETS sysu-tester-performance_${mainname})
endforeach()
2 changes: 1 addition & 1 deletion performance_test2021-private/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ foreach(mainfile ${mains})
sysy)
target_include_directories(
sysu-tester-performance_test2021-private_${mainname}
PRIVATE ${CMAKE_SOURCE_DIR}/librarian/include)
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../librarian/include)
install(TARGETS sysu-tester-performance_test2021-private_${mainname})
endforeach()
5 changes: 3 additions & 2 deletions performance_test2021-public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ foreach(mainfile ${mains})
${mainfile})
target_link_libraries(sysu-tester-performance_test2021-public_${mainname}
sysy)
target_include_directories(sysu-tester-performance_test2021-public_${mainname}
PRIVATE ${CMAKE_SOURCE_DIR}/librarian/include)
target_include_directories(
sysu-tester-performance_test2021-public_${mainname}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../librarian/include)
install(TARGETS sysu-tester-performance_test2021-public_${mainname})
endforeach()
2 changes: 1 addition & 1 deletion performance_test2022-private/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ foreach(mainfile ${mains})
sysy)
target_include_directories(
sysu-tester-performance_test2022-private_${mainname}
PRIVATE ${CMAKE_SOURCE_DIR}/librarian/include)
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../librarian/include)
install(TARGETS sysu-tester-performance_test2022-private_${mainname})
endforeach()
5 changes: 3 additions & 2 deletions performance_test2022-public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ foreach(mainfile ${mains})
${mainfile})
target_link_libraries(sysu-tester-performance_test2022-public_${mainname}
sysy)
target_include_directories(sysu-tester-performance_test2022-public_${mainname}
PRIVATE ${CMAKE_SOURCE_DIR}/librarian/include)
target_include_directories(
sysu-tester-performance_test2022-public_${mainname}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../librarian/include)
install(TARGETS sysu-tester-performance_test2022-public_${mainname})
endforeach()

0 comments on commit cd5ce94

Please sign in to comment.