Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4003CEM-iterators/CMakeLists.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (32 sloc)
1.21 KB
This file contains 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 3.0) | |
set(CMAKE_CXX_STANDARD 14) | |
project(cppintro CXX) | |
# config directories | |
include_directories(${CMAKE_SOURCE_DIR}) | |
# add tests | |
enable_testing() | |
add_subdirectory(Testing) | |
add_subdirectory(Lecture) | |
# tell cmake where to put the executables that it creates | |
# also creates the directory if needed | |
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin ) | |
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/lib) | |
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib) | |
#add_library(Testv SHARED test.cpp) | |
#add_library(GetInput INTERFACE) | |
#target_include_directories(Input INTERFACE ${CMAKE_SOURCE_DIR}) | |
#add_executable( leap lab_leap.cpp ) | |
#target_link_libraries( leap Testv ) | |
#add_executable( hello lab_hello.cpp ) | |
#add_executable( age lab_age.cpp ) | |
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/pre_*.cpp") | |
foreach(filename ${files}) | |
get_filename_component(EXEC ${filename} NAME_WE) | |
add_executable(${EXEC} ${filename} ${HEADERS}) | |
endforeach() | |
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/lab_*.cpp") | |
foreach(filename ${files}) | |
get_filename_component(EXEC ${filename} NAME_WE) | |
add_executable(${EXEC} ${filename} ${HEADERS}) | |
endforeach() | |