mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 13:41:13 +02:00
Use ${PROJECT_NAME} instead of writing projectname multiple times (#134)
* Remove duplicate mentions of project name and replaced it with ${PROJECT_NAME} variable Update CMakeLists.txt * Added ${CMAKE_PROJECT_NAME} * reverted usage of to Greeter and ran fix-format * Update test/CMakeLists.txt Co-authored-by: Dominic Dinser <dominic.dinser@leica-geosystems.com> Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
This commit is contained in:
parent
69320a663b
commit
e0bf3f59d1
3 changed files with 17 additions and 16 deletions
|
@ -22,8 +22,8 @@ CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
|||
|
||||
file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
|
||||
|
||||
add_executable(GreeterStandalone ${sources})
|
||||
add_executable(${PROJECT_NAME} ${sources})
|
||||
|
||||
set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter")
|
||||
|
||||
target_link_libraries(GreeterStandalone Greeter::Greeter cxxopts)
|
||||
target_link_libraries(${PROJECT_NAME} Greeter::Greeter cxxopts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue