From 2a1f5a35ad3678f9175a0c937eeb07a29c65ba8a Mon Sep 17 00:00:00 2001 From: Rama Krishnan Raghupathy Date: Fri, 6 Mar 2015 18:15:55 -0800 Subject: With This change the tests build all the native components first and then builds the managed components. The managed components can refer to the native projects by the following construct in the .csproj [tfs-changeset: 1427574] --- tests/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/CMakeLists.txt (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000000..f2d444c436 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,31 @@ +# Require at least version 2.8.12 of CMake +cmake_minimum_required(VERSION 2.8.12) + +set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform) +if (WIN32) + add_definitions(-DWINDOWS=1) +endif() + +MACRO(SUBDIRLIST result curdir) + FILE(GLOB children RELATIVE ${curdir} ${curdir}/*) + SET(dirlist "") + FOREACH(child ${children}) + IF(IS_DIRECTORY ${curdir}/${child}) + LIST(APPEND dirlist ${child}) + ENDIF() + ENDFOREACH() + SET(${result} ${dirlist}) +ENDMACRO() + +MACRO(ADDSUBDIR_REC curdir) + SUBDIRLIST(SUB_DIRS ${curdir}) + FOREACH(subdir ${SUB_DIRS}) + if(EXISTS "${curdir}/${subdir}/CMakeLists.txt") + ADD_SUBDIRECTORY(${curdir}/${subdir}) + else() + ADDSUBDIR_REC(${curdir}/${subdir}) + endif(EXISTS "${curdir}/${subdir}/CMakeLists.txt") + ENDFOREACH() +ENDMACRO() + +ADDSUBDIR_REC(${CMAKE_CURRENT_SOURCE_DIR}) -- cgit v1.2.3