1 # Require at least version 2.8.12 of CMake
2 cmake_minimum_required(VERSION 2.8.12)
4 if (CMAKE_CONFIGURATION_TYPES) # multi-configuration generator?
5 set(CMAKE_CONFIGURATION_TYPES "Debug;Checked;Release;RelWithDebInfo" CACHE STRING "" FORCE)
6 endif (CMAKE_CONFIGURATION_TYPES)
7 set(CMAKE_C_FLAGS_CHECKED "")
8 set(CMAKE_CXX_FLAGS_CHECKED "")
9 set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
10 set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
12 set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform)
14 add_definitions(-DWINDOWS=1)
20 add_compile_options(-wd4100 -wd4514 -wd4668 -wd4710 -wd4711 -wd4820)
23 if(CLR_CMAKE_PLATFORM_UNIX)
24 add_compile_options(-fPIC)
25 endif(CLR_CMAKE_PLATFORM_UNIX)
27 MACRO(SUBDIRLIST result curdir)
28 FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
30 FOREACH(child ${children})
31 IF(IS_DIRECTORY ${curdir}/${child})
32 LIST(APPEND dirlist ${child})
35 SET(${result} ${dirlist})
38 MACRO(ADDSUBDIR_REC curdir)
39 SUBDIRLIST(SUB_DIRS ${curdir})
40 FOREACH(subdir ${SUB_DIRS})
41 if(EXISTS "${curdir}/${subdir}/CMakeLists.txt")
42 ADD_SUBDIRECTORY(${curdir}/${subdir})
44 ADDSUBDIR_REC(${curdir}/${subdir})
45 endif(EXISTS "${curdir}/${subdir}/CMakeLists.txt")
49 ADDSUBDIR_REC(${CMAKE_CURRENT_SOURCE_DIR})