Skip to content

Commit

Permalink
trying to ignore third party differently
Browse files Browse the repository at this point in the history
  • Loading branch information
AviaAv committed Sep 29, 2024
1 parent b17297f commit 4d1f23d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 26 deletions.
4 changes: 0 additions & 4 deletions CMake/external_fastdds.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ function(get_fastdds)
message(CHECK_PASS "Done")
endfunction()

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# Trigger the FastDDS build
get_fastdds()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
4 changes: 0 additions & 4 deletions CMake/external_foonathan_memory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ function(get_foonathan_memory)

endfunction()

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

get_foonathan_memory()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
4 changes: 0 additions & 4 deletions CMake/external_json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ function(get_nlohmann_json)

endfunction()

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# Trigger the build
get_nlohmann_json()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
5 changes: 0 additions & 5 deletions CMake/external_libcurl.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
if(CHECK_FOR_UPDATES)

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

include(ExternalProject)
message(STATUS "Building libcurl enabled")

Expand Down Expand Up @@ -64,6 +61,4 @@ if(CHECK_FOR_UPDATES)
endif()
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
endif() #CHECK_FOR_UPDATES
4 changes: 4 additions & 0 deletions CMake/unix_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ macro(os_set_flags)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")


set_directory_properties(PROPERTIES DIRECTORY third-party/ COMPILE_OPTIONS "-w)
set_source_files_properties(third-party/*.* PROPERTIES COMPILE_OPTIONS "-w")
#################
Expand Down
4 changes: 4 additions & 0 deletions CMake/windows_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ macro(os_set_flags)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")


set_directory_properties(PROPERTIES DIRECTORY third-party/ COMPILE_OPTIONS "/W0")
set_source_files_properties(third-party/*.* PROPERTIES COMPILE_OPTIONS "/W0")

#################

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /wd4819")
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ global_target_config()

include(CMake/install_config.cmake)

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_subdirectory(wrappers)
if ( ( BUILD_EXAMPLES OR BUILD_PC_STITCHING ) AND BUILD_GLSL_EXTENSIONS )
find_package(glfw3 3.3 QUIET)
Expand All @@ -95,8 +93,6 @@ if ( ( BUILD_EXAMPLES OR BUILD_PC_STITCHING ) AND BUILD_GLSL_EXTENSIONS )
endif()
add_subdirectory(src/gl)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")

if(BUILD_EXAMPLES)
add_subdirectory(examples)
Expand Down
5 changes: 0 additions & 5 deletions third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
string(REPLACE ${PROJECT_SOURCE_DIR}/ "" _rel_path ${CMAKE_CURRENT_LIST_DIR})

string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${ADDITIONAL_COMPILER_FLAGS}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

include(CMake/external_json.cmake)

add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/rsutils" )
Expand All @@ -21,5 +18,3 @@ if( BUILD_WITH_DDS )
add_subdirectory( "${CMAKE_CURRENT_LIST_DIR}/realdds" )
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_COMPILER_FLAGS}")

0 comments on commit 4d1f23d

Please sign in to comment.