Remove unnecessary project() calls

project() should only be called if the subdirectory, in fact, can be
built standalone.
This commit is contained in:
2024-11-18 15:42:37 +01:00
parent e1b8bbf12d
commit ca9ef16d0d
13 changed files with 57 additions and 72 deletions

View File

@@ -35,8 +35,6 @@
### benches_dramsys ###
###############################################
project(benches_dramsys)
set(BENCHMARK_ENABLE_TESTING OFF)
FetchContent_Declare(
@@ -46,15 +44,15 @@ FetchContent_Declare(
FetchContent_MakeAvailable(benchmark)
add_executable(${PROJECT_NAME}
add_executable(benches_dramsys
main.cpp
simulation.cpp
addressdecoder.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER benches)
target_link_libraries(${PROJECT_NAME}
target_include_directories(benches_dramsys PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(benches_dramsys PROPERTIES FOLDER benches)
target_link_libraries(benches_dramsys
DRAMSys::util
DRAMSys::libdramsys
DRAMSys::simulator