Skip to content

Commit

Permalink
Use CMAKE_CXX_STANDARD instead of open coding it
Browse files Browse the repository at this point in the history
  • Loading branch information
radfordi committed Apr 5, 2019
1 parent a3cee5c commit 6f61fd0
Show file tree
Hide file tree
Showing 39 changed files with 34 additions and 498 deletions.
1 change: 1 addition & 0 deletions CMake/global_config.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_CXX_STANDARD 11)
# View the makefile commands during build
#set(CMAKE_VERBOSE_MAKEFILE on)

Expand Down
15 changes: 1 addition & 14 deletions examples/align-advanced/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesAlignAdvanced)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
#align
add_executable(rs-align-advanced rs-align-advanced.cpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-align-advanced PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-align-advanced ${DEPENDENCIES})
include_directories(rs-align-advanced ../../common ../../third-party/imgui)
set_target_properties (rs-align-advanced PROPERTIES FOLDER Examples)
Expand Down
15 changes: 1 addition & 14 deletions examples/align/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesAlign)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
#align
add_executable(rs-align rs-align.cpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-align PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-align ${DEPENDENCIES})
include_directories(rs-align ../../common ../../third-party/imgui)
set_target_properties (rs-align PROPERTIES FOLDER Examples)
Expand Down
13 changes: 1 addition & 12 deletions examples/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(rs-callback)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(${PROJECT_NAME} ${PROJECT_NAME}.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} ${DEPENDENCIES})
include_directories(${PROJECT_NAME} ../ ../../third-party/tclap/include)
set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/capture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesCapture)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-capture rs-capture.cpp ../example.hpp)
set_property(TARGET rs-capture PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-capture ${DEPENDENCIES})
include_directories(rs-capture ../ ../../third-party/tclap/include)
set_target_properties (rs-capture PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/hello-realsense/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,8 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesHelloRealSense)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

add_executable(rs-hello-realsense rs-hello-realsense.cpp)
set_property(TARGET rs-hello-realsense PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-hello-realsense ${DEPENDENCIES})
include_directories(rs-hello-realsense)
set_target_properties (rs-hello-realsense PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/measure/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,12 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesMeasure)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-measure rs-measure.cpp ../example.hpp)
set_property(TARGET rs-measure PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-measure ${DEPENDENCIES} Threads::Threads)
include_directories(rs-measure ../)
set_target_properties (rs-measure PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/motion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesMotion)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-motion rs-motion.cpp ../example.hpp ../../common/res/d435.h ${LZ4_DIR}/lz4.c)
set_property(TARGET rs-motion PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-motion ${DEPENDENCIES})
include_directories(../ ../../common/res ${LZ4_DIR})
set_target_properties (rs-motion PROPERTIES FOLDER Examples)
Expand Down
14 changes: 1 addition & 13 deletions examples/multicam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesMulticam)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
# multicam
add_executable(rs-multicam rs-multicam.cpp ../example.hpp)
set_property(TARGET rs-multicam PROPERTY CXX_STANDARD 11)
include_directories(rs-multicam ../)
target_link_libraries(rs-multicam ${DEPENDENCIES})
set_target_properties (rs-multicam PROPERTIES FOLDER Examples)
Expand Down
14 changes: 1 addition & 13 deletions examples/pointcloud/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesPointcloud)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
#pointcloud
add_executable(rs-pointcloud rs-pointcloud.cpp ../example.hpp)
set_property(TARGET rs-pointcloud PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-pointcloud ${DEPENDENCIES})
include_directories(rs-pointcloud ../)
set_target_properties (rs-pointcloud PROPERTIES FOLDER Examples)
Expand Down
13 changes: 1 addition & 12 deletions examples/pose-predict/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesPosePredict)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_EXAMPLES)
add_executable(rs-pose-predict rs-pose-predict.cpp)
set_property(TARGET rs-pose-predict PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-pose-predict ${DEPENDENCIES})
set_target_properties (rs-pose-predict PROPERTIES FOLDER Examples)
install(TARGETS rs-pose-predict RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
13 changes: 1 addition & 12 deletions examples/pose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesPose)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_EXAMPLES)
add_executable(rs-pose rs-pose.cpp)
set_property(TARGET rs-pose PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-pose ${DEPENDENCIES})
set_target_properties (rs-pose PROPERTIES FOLDER Examples)
install(TARGETS rs-pose RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
13 changes: 1 addition & 12 deletions examples/post-processing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesPost-Processing)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-post-processing rs-post-processing.cpp ../example.hpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-post-processing PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-post-processing ${DEPENDENCIES})
include_directories(rs-post-processing ../ ../../third-party/tclap/include ../../third-party/imgui)
set_target_properties (rs-post-processing PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/record-playback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesRecord-Playback)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-record-playback rs-record-playback.cpp ../example.hpp ../../third-party/imgui/imgui.cpp ../../third-party/imgui/imgui_draw.cpp ../../third-party/imgui/imgui_impl_glfw.cpp)
set_property(TARGET rs-record-playback PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-record-playback ${DEPENDENCIES})
include_directories(rs-record-playback ../ ../../third-party/tclap/include ../../third-party/imgui)
set_target_properties (rs-record-playback PROPERTIES FOLDER "Examples")
Expand Down
14 changes: 1 addition & 13 deletions examples/save-to-disk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesSaveToDisk)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

# save-to-disk
add_executable(rs-save-to-disk rs-save-to-disk.cpp)
set_property(TARGET rs-save-to-disk PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-save-to-disk ${DEPENDENCIES})
include_directories(rs-save-to-disk ../../common ../../third-party ../../third-party/tclap/include)
set_target_properties (rs-save-to-disk PROPERTIES FOLDER "Examples")
Expand Down
14 changes: 1 addition & 13 deletions examples/sensor-control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesSensorControl)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
#sensor-control
add_executable(rs-sensor-control api_how_to.h rs-sensor-control.cpp)
set_property(TARGET rs-sensor-control PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-sensor-control ${DEPENDENCIES})
include_directories(rs-sensor-control)
set_target_properties (rs-sensor-control PROPERTIES FOLDER Examples)
Expand Down
10 changes: 1 addition & 9 deletions examples/software-device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ project(RealsenseExamplesSoftwareDevice)
# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-software-device rs-software-device.cpp)
set_property(TARGET rs-software-device PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-software-device ${DEPENDENCIES})
include_directories(rs-software-device ../ ../../third-party/tclap/include ../../third-party/ ../../common/res)
set_target_properties (rs-software-device PROPERTIES FOLDER "Examples")
Expand Down
13 changes: 1 addition & 12 deletions examples/trajectory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ cmake_minimum_required(VERSION 3.1.0)

project(RealsenseExamplesTrajectory)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(BUILD_GRAPHICAL_EXAMPLES)
add_executable(rs-trajectory rs-trajectory.cpp ../example.hpp ../../common/res/t265.h ${LZ4_DIR}/lz4.c)
set_property(TARGET rs-trajectory PROPERTY CXX_STANDARD 11)
target_link_libraries(rs-trajectory ${DEPENDENCIES})
include_directories(../ ../../common/res ${LZ4_DIR})
set_target_properties (rs-trajectory PROPERTIES FOLDER Examples)
Expand Down
Loading

0 comments on commit 6f61fd0

Please sign in to comment.