Maxime Dupuis
/
NerfUS_cmake_cleanup
NerfUS_cmake_cleanup
Fork of NerfUS by
GoogleTest.cmake@8:0498fa4f5c1f, 2017-02-09 (annotated)
- Committer:
- Maxime Dupuis
- Date:
- Thu Feb 09 14:24:39 2017 -0500
- Revision:
- 8:0498fa4f5c1f
Simplify the build process
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Maxime Dupuis |
8:0498fa4f5c1f | 1 | cmake_minimum_required(VERSION 3.5) |
Maxime Dupuis |
8:0498fa4f5c1f | 2 | |
Maxime Dupuis |
8:0498fa4f5c1f | 3 | # Download and unpack googletest at configure time |
Maxime Dupuis |
8:0498fa4f5c1f | 4 | configure_file(CMakeLists.txt.in |
Maxime Dupuis |
8:0498fa4f5c1f | 5 | googletest-download/CMakeLists.txt) |
Maxime Dupuis |
8:0498fa4f5c1f | 6 | |
Maxime Dupuis |
8:0498fa4f5c1f | 7 | execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . |
Maxime Dupuis |
8:0498fa4f5c1f | 8 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) |
Maxime Dupuis |
8:0498fa4f5c1f | 9 | execute_process(COMMAND ${CMAKE_COMMAND} --build . |
Maxime Dupuis |
8:0498fa4f5c1f | 10 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) |
Maxime Dupuis |
8:0498fa4f5c1f | 11 | |
Maxime Dupuis |
8:0498fa4f5c1f | 12 | # Add googletest directly to our build. This adds the following targets: gtest, gtest_main, gmock and gmock_main |
Maxime Dupuis |
8:0498fa4f5c1f | 13 | add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src |
Maxime Dupuis |
8:0498fa4f5c1f | 14 | ${CMAKE_BINARY_DIR}/googletest-build) |
Maxime Dupuis |
8:0498fa4f5c1f | 15 | |
Maxime Dupuis |
8:0498fa4f5c1f | 16 | include_directories("${gtest_SOURCE_DIR}/include") |
Maxime Dupuis |
8:0498fa4f5c1f | 17 |