1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 13:41:13 +02:00

Add CONFIGURE_DEPENDS flag to globs and cleanup (#5)

* join comments

* join target properties

* add empty lines

* update readme

* add CONFIGURE_DEPENDS to glob sources

* update comment about glob

* update comment about removing unused files

* update glob comment in the main CMakeLists
This commit is contained in:
Lars Melchior 2020-04-14 14:56:32 +02:00 committed by GitHub
parent 24aa8560db
commit 23abf01c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 20 deletions

View file

@ -24,8 +24,14 @@ CPMAddPackage(
# ---- Create standalone executable ----
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
add_executable(GreeterStandalone ${sources})
set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 COMPILE_FLAGS "-Wall -pedantic -Wextra")
set_target_properties(GreeterStandalone PROPERTIES OUTPUT_NAME "Greeter")
set_target_properties(GreeterStandalone PROPERTIES
CXX_STANDARD 17
COMPILE_FLAGS "-Wall -pedantic -Wextra"
OUTPUT_NAME "Greeter"
)
target_link_libraries(GreeterStandalone Greeter cxxopts)