Skip to content

Commit fa39de9

Browse files
committed
Add src/\*.cpp files by default
1 parent 69741fa commit fa39de9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ include(cmake/CompilerWarnings.cmake)
2727
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2828

2929
#! Project main executable source compilation
30-
add_executable(${PROJECT} main.cpp
31-
myprogram.cpp myprogram.hpp)
30+
file(GLOB SOURCES
31+
"src/*.cpp"
32+
)
33+
add_executable(${PROJECT} ${SOURCES})
3234

3335
#! Put path to your project headers
3436
target_include_directories(${PROJECT} PRIVATE include)

0 commit comments

Comments
 (0)