Skip to content

Instantly share code, notes, and snippets.

@marcionicolau
Last active March 20, 2016 20:45
Show Gist options
  • Save marcionicolau/4d6afaaf4a6b40050d83 to your computer and use it in GitHub Desktop.
Save marcionicolau/4d6afaaf4a6b40050d83 to your computer and use it in GitHub Desktop.
CMake with directories
cmake_minimum_required(VERSION 2.8.9)
project(directory_test)
#Bring the headers, such as Student.h into the project
include_directories(include)
#Can manually add the sources using the set command as follows:
#set(SOURCES src/mainapp.cpp src/Student.cpp)
#However, the file(GLOB...) allows for wildcard additions:
file(GLOB SOURCES "src/*.cpp")
add_executable(testStudent ${SOURCES})
enable_testing()
add_test(Example-01 build/p1993 10 10)
1
2
3
4
5
6
7
8
9
10
11
12
13
cmake_minimum_required(VERSION 2.8.9)
project(directory_test)
#Bring the headers, such as Student.h into the project
include_directories(include)
#Can manually add the sources using the set command as follows:
#set(SOURCES src/mainapp.cpp src/Student.cpp)
#However, the file(GLOB...) allows for wildcard additions:
file(GLOB SOURCES "src/*.cpp")
add_executable(testStudent ${SOURCES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment