Last active
March 20, 2016 20:45
-
-
Save marcionicolau/4d6afaaf4a6b40050d83 to your computer and use it in GitHub Desktop.
CMake with directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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