forked from LebedevIlyaG/DiRect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (30 loc) · 1.53 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 2.8.8)
set(PROJECT_NAME_STR direct_opt)
project(${PROJECT_NAME_STR} C CXX)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-Wno-deprecated)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
endif()
if(MSVC)
# TODO: add optimization options for msvc
# vc 2012 fix for vararg templates
add_definitions("-D_VARIADIC_MAX=10")
endif()
set(pugixml pugixml)
set(PROBLEM_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/_bin CACHE STRING "Output directory")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROBLEM_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROBLEM_OUTPUT_DIRECTORY})
set(SCL_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin CACHE STRING "Output directory")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${SCL_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${SCL_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${SCL_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${SCL_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${SCL_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${SCL_OUTPUT_DIRECTORY})
# set common include folder for module
set(COMMON_INCLUDES ${PROJECT_SOURCE_DIR}/src)
file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.c" "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB hdrs "${PROJECT_SOURCE_DIR}/src/*.h*" "${PROJECT_SOURCE_DIR}/src/*.hpp*" "${PROJECT_SOURCE_DIR}/src/parameters/*.h*")
add_executable(${PROJECT_NAME_STR}_test ${SRC_FILES} ${srcs} ${hdrs})
add_subdirectory(Grishagin)
add_subdirectory(Rastrigin2)