mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 20:24:35 +03:00
14 lines
374 B
CMake
14 lines
374 B
CMake
# Set the project name
|
|
project (subproject1)
|
|
|
|
# Create a sources variable with a link to all cpp files to compile
|
|
set(SOURCES
|
|
main1.cpp
|
|
)
|
|
|
|
# include the file with the function then call the macro
|
|
include(${CMAKE_SOURCE_DIR}/cmake/analysis.cmake)
|
|
add_analysis(${PROJECT_NAME} SOURCES)
|
|
|
|
# Add an executable with the above sources
|
|
add_executable(${PROJECT_NAME} ${SOURCES}) |