Update CMakeLists.txt

This commit is contained in:
XiaoTian 2024-07-10 15:56:17 +08:00 committed by GitHub
parent 5389660dc5
commit c2589900f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,14 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
add_compile_options( -fopenmp -O3)
set(CMAKE_BUILD_TYPE Release)
add_compile_options(-O3 -fopenmp)
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})