@@ -3,39 +3,36 @@ if (NOT EXISTS ${XPTI_SOURCE_DIR})
3
3
endif ()
4
4
include_directories (${XPTI_SOURCE_DIR} /include )
5
5
6
- # Only download Google Test outside of LLVM tree.
7
- if (NOT DEFINED LLVM_EXTERNAL_XPTIFW_SOURCE_DIR)
8
- # Download and unpack googletest at configure time
9
- configure_file (../CMakeLists.txt.in googletest-download/CMakeLists.txt)
10
- execute_process (COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR} " .
11
- RESULT_VARIABLE result
12
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /googletest-download )
13
- if (result)
14
- message (FATAL_ERROR "CMake step for googletest failed: ${result} " )
15
- endif ()
16
- execute_process (COMMAND ${CMAKE_COMMAND} --build .
17
- RESULT_VARIABLE result
18
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /googletest-download )
19
- if (result)
20
- message (FATAL_ERROR "Build step for googletest failed: ${result} " )
21
- endif ()
6
+ # Download and unpack googletest at configure time
7
+ configure_file (../CMakeLists.txt.in googletest-download/CMakeLists.txt)
8
+ execute_process (COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR} " .
9
+ RESULT_VARIABLE result
10
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /googletest-download )
11
+ if (result)
12
+ message (FATAL_ERROR "CMake step for googletest failed: ${result} " )
13
+ endif ()
14
+ execute_process (COMMAND ${CMAKE_COMMAND} --build .
15
+ RESULT_VARIABLE result
16
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /googletest-download )
17
+ if (result)
18
+ message (FATAL_ERROR "Build step for googletest failed: ${result} " )
19
+ endif ()
22
20
23
- # Prevent overriding the parent project's compiler/linker
24
- # settings on Windows
25
- set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
21
+ # Prevent overriding the parent project's compiler/linker
22
+ # settings on Windows
23
+ set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
26
24
27
- # Add googletest directly to our build. This defines
28
- # the gtest and gtest_main targets.
29
- add_subdirectory (${CMAKE_CURRENT_BINARY_DIR} /googletest-src
30
- ${CMAKE_CURRENT_BINARY_DIR} /googletest-build
31
- EXCLUDE_FROM_ALL )
25
+ # Add googletest directly to our build. This defines
26
+ # the gtest and gtest_main targets.
27
+ add_subdirectory (${CMAKE_CURRENT_BINARY_DIR} /googletest-src
28
+ ${CMAKE_CURRENT_BINARY_DIR} /googletest-build
29
+ EXCLUDE_FROM_ALL )
32
30
33
- # The gtest/gtest_main targets carry header search path
34
- # dependencies automatically when using CMake 2.8.11 or
35
- # later. Otherwise we have to add them here ourselves.
36
- if (CMAKE_VERSION VERSION_LESS 2.8.11)
37
- include_directories ("${gtest_SOURCE_DIR} /include" )
38
- endif ()
31
+ # The gtest/gtest_main targets carry header search path
32
+ # dependencies automatically when using CMake 2.8.11 or
33
+ # later. Otherwise we have to add them here ourselves.
34
+ if (CMAKE_VERSION VERSION_LESS 2.8.11)
35
+ include_directories ("${gtest_SOURCE_DIR} /include" )
39
36
endif ()
40
37
41
38
# Now simply link against gtest or gtest_main as needed. Eg
0 commit comments