Skip to content

Commit

Permalink
revert redundant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hmusta committed Sep 26, 2024
1 parent ce65ac3 commit e27d44c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ metagraph/**/build*
tags
**/cmake-build-debug
.idea
.vscode
48 changes: 24 additions & 24 deletions metagraph/CMakeListsHelpers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@


function (findOpenMP)
# unset OpenMP_CXX_FLAGS. If OpenMP loading fails once, it will be set to NOT_FOUND
# and happily cached, thus messing up the compilation flags forever
unset(OpenMP_C_FLAGS CACHE)
unset(OpenMP_CXX_FLAGS CACHE)
if(APPLE AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(
COMMAND brew --prefix libomp
OUTPUT_VARIABLE BREW_OMP_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I${BREW_OMP_PREFIX}/include")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I${BREW_OMP_PREFIX}/include")
set(OpenMP_C_LIB_NAMES libomp)
set(OpenMP_CXX_LIB_NAMES libomp)
set(OpenMP_libomp_LIBRARY ${BREW_OMP_PREFIX}/lib/libomp.dylib)
endif()
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE)
set(OpenMP_CXX_LIBRARIES "${OpenMP_CXX_LIBRARIES}" PARENT_SCOPE)
set(OpenMP_CXX_VERSION "${OpenMP_CXX_VERSION}" PARENT_SCOPE)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(OpenMP_CXX_LIBRARIES ${OpenMP_CXX_LIBRARIES} -latomic PARENT_SCOPE)
endif()
# unset OpenMP_CXX_FLAGS. If OpenMP loading fails once, it will be set to NOT_FOUND
# and happily cached, thus messing up the compilation flags forever
unset(OpenMP_C_FLAGS CACHE)
unset(OpenMP_CXX_FLAGS CACHE)
if(APPLE AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(
COMMAND brew --prefix libomp
OUTPUT_VARIABLE BREW_OMP_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I${BREW_OMP_PREFIX}/include")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I${BREW_OMP_PREFIX}/include")
set(OpenMP_C_LIB_NAMES libomp)
set(OpenMP_CXX_LIB_NAMES libomp)
set(OpenMP_libomp_LIBRARY ${BREW_OMP_PREFIX}/lib/libomp.dylib)
endif()
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE)
set(OpenMP_CXX_LIBRARIES "${OpenMP_CXX_LIBRARIES}" PARENT_SCOPE)
set(OpenMP_CXX_VERSION "${OpenMP_CXX_VERSION}" PARENT_SCOPE)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(OpenMP_CXX_LIBRARIES ${OpenMP_CXX_LIBRARIES} -latomic PARENT_SCOPE)
endif()
endfunction()

# check for std::filesystem::temp_directory_path
Expand Down

0 comments on commit e27d44c

Please sign in to comment.